-
Notifications
You must be signed in to change notification settings - Fork 821
envcar: ignore non-normalized env names on Get and Keys #9112
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
Merged
pellared
merged 32 commits into
open-telemetry:main
from
pellared:env-var-get-keys-dont-normalize
Jun 25, 2026
Merged
Changes from 7 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
a9d8b20
envcar: ignore non-normalized env names on Carrier.Get and Carrier.Keys
pellared 0d68660
add PR number
pellared a55d64e
Potential fix for pull request finding
pellared 4886024
skip some tests on windows
pellared da59bd7
Merge branch 'main' into env-var-get-keys-dont-normalize
pellared c570540
Merge branch 'main' into env-var-get-keys-dont-normalize
pellared d74740b
examples to restore the original value when it existed
pellared 651c756
Merge branch 'main' into env-var-get-keys-dont-normalize
pellared f2dd0db
Merge branch 'main' into env-var-get-keys-dont-normalize
pellared 6cb0baa
Merge branch 'main' into env-var-get-keys-dont-normalize
pellared bec22d3
Merge branch 'main' into env-var-get-keys-dont-normalize
pellared ca0cacf
avoid environment scan in Carrier.Get
pellared 5b1606f
add environment carrier operational guidance
pellared 0fedf62
handle empty env key normalization
pellared f57490e
isolate non-normalized env tests
pellared de3aca6
Merge branch 'main' into env-var-get-keys-dont-normalize
pellared fd398ac
optimize caching
pellared c08dd30
git pushMerge branch 'env-var-get-keys-dont-normalize' of github.com:…
pellared 8c69898
rename cache
pellared 39c204e
update GoDoc
pellared c484525
refactor tests
pellared 591c0c3
fix TestCarrierKeys
pellared 060e0d3
optimize fetch
pellared 6a2ef55
add a note regarding Windows
pellared aeaccb0
Keys to read directly from environ
pellared ef3ca09
note that applications should extract context during startup
pellared 8da7802
improve GoDoc
pellared 19c35a0
refactor examples
pellared 9dcb3ef
improve example comments
pellared d7db01a
Merge branch 'main' into env-var-get-keys-dont-normalize
pellared 9845fa3
Merge branch 'main' into env-var-get-keys-dont-normalize
pellared f15acc3
do not use SDK in ExampleCarrier_childProcess
pellared File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This still enumerates the whole process environment on the first
Getfor a carrier. The spec change this PR tracks saysGetshould normalize the requested key and use that normalized key name to read from the carrier; the linked issue specifically calls out avoiding the old full-environment loop when env propagation is not configured.Can we make
Getdo a direct lookup ofnormalize(key)instead, and leave enumeration toKeys?Uh oh!
There was an error while loading. Please reload this page.
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.
I support your proposal.
Addressed in ca0cacf and fd398ac
Some spec wording that can motivate the original decision from https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/env-carriers.md#operational-guidance
I also had a discussion with @dashpole that probably the "Operational Guidance" should use non-normative wording as it should indicate how the carrier should be used. Maybe some normative wording could be use to call out the languages should document guidance how the carriers should be used.
I tried to "implement" the guidance here 5b1606f