Skip to content

Fix default merging of resource attributes from environment variable#1785

Merged
Aneurysm9 merged 14 commits intoopen-telemetry:mainfrom
open-o11y:Merge-env-variable-resource
Apr 21, 2021
Merged

Fix default merging of resource attributes from environment variable#1785
Aneurysm9 merged 14 commits intoopen-telemetry:mainfrom
open-o11y:Merge-env-variable-resource

Conversation

@dhruv-vora
Copy link
Copy Markdown
Contributor

Extracted the resource attributes from the OTEL_RESOURCE_ATTRIBUTES environment variable and merged them with the resource.Default resource as well as resources provided to the TracerProvider and metric Controller.

Fixes #1689

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 7, 2021

Codecov Report

Merging #1785 (d213d3a) into main (96c5e4b) will increase coverage by 0.0%.
The diff coverage is 100.0%.

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #1785   +/-   ##
=====================================
  Coverage   78.4%   78.4%           
=====================================
  Files        135     135           
  Lines       7247    7252    +5     
=====================================
+ Hits        5685    5689    +4     
- Misses      1315    1316    +1     
  Partials     247     247           
Impacted Files Coverage Δ
sdk/metric/controller/basic/config.go 100.0% <100.0%> (ø)
sdk/resource/resource.go 64.2% <100.0%> (+3.5%) ⬆️
sdk/trace/provider.go 83.8% <100.0%> (-0.2%) ⬇️
exporters/trace/jaeger/jaeger.go 88.9% <0.0%> (-0.5%) ⬇️
sdk/trace/batch_span_processor.go 83.9% <0.0%> (ø)

@MrAlias MrAlias added this to the RC1 milestone Apr 20, 2021
Comment thread sdk/resource/resource.go Outdated
Comment thread CHANGELOG.md Outdated
Comment thread sdk/trace/provider.go Outdated
Comment thread sdk/trace/provider.go Outdated
@MrAlias
Copy link
Copy Markdown
Contributor

MrAlias commented Apr 21, 2021

This looks ready to merge. @dhruv-vora can you sync with main or allow maintainers to modify the PR?

@Aneurysm9 Aneurysm9 merged commit 0032bd6 into open-telemetry:main Apr 21, 2021
@MrAlias MrAlias mentioned this pull request Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The SDK MUST extract information from the OTEL_RESOURCE_ATTRIBUTES environment variable

3 participants