opentelemetry-api: update EnvironmentGetter to ignore non-normalized environment variable names#5289
Open
pellared wants to merge 5 commits into
Open
opentelemetry-api: update EnvironmentGetter to ignore non-normalized environment variable names#5289pellared wants to merge 5 commits into
pellared wants to merge 5 commits into
Conversation
cijothomas
pushed a commit
to cijothomas/opentelemetry-specification
that referenced
this pull request
Jun 12, 2026
…etry#5144) Fixes open-telemetry#5143 Prototypes: - open-telemetry/opentelemetry-go-contrib#9112 - open-telemetry/opentelemetry-cpp#4141 - open-telemetry/opentelemetry-java#8474 - open-telemetry/opentelemetry-js#6774 - open-telemetry/opentelemetry-python#5289 - open-telemetry/opentelemetry-swift-core#83 ### Rationale The previous wording required environment variable carriers to normalize every key present in the carrier before matching a requested propagation key. This PR removes that requirement for two reasons: - **Efficiency**: extraction should not require reading every environment variable - **Determinism**: if multiple environment variable names normalize to the same key, selecting one is ambiguous and implementation-dependent. Instead, carriers normalize the key requested by the propagator and read only the corresponding normalized environment variable name. `Keys` similarly returns only environment variable names that are already normalized. This keeps injection behavior unchanged while making extraction predictable and avoiding unnecessary environment enumeration.
pmcollins
approved these changes
Jun 12, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follows open-telemetry/opentelemetry-specification#5144