-
Notifications
You must be signed in to change notification settings - Fork 651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Resource merge key conflict precedence #1544
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! This was confusing in the spec before.
I think this line needs to be changed to keep the docstring on OTEL_RESOURCE_ATTRIBUTES
accurate (OTEL_RESOURCE_ATTRIBUTES
envvar should have lower precendence):
opentelemetry-python/opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py
Line 113 in 6489bf5
resource = _DEFAULT_RESOURCE.merge(Resource(attributes)) |
@aabmass Thanks for pointing that out, I have added test to ensure the priority. Also updated the docstrings. Please take another look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice thanks!
Description
Fixes #1543
Type of change
How Has This Been Tested?
tox -e test-core-sdk
Does This PR Require a Contrib Repo Change?
Checklist: