Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ release.

### Context

- Clarify that environment variable propagation carriers normalize requested
keys, carrier keys, and returned keys.
([#5102](https://github.com/open-telemetry/opentelemetry-specification/pull/5102))

### Traces

### Metrics
Expand Down
13 changes: 13 additions & 0 deletions specification/context/env-carriers.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,19 @@ Environment variable names used for context propagation:
(`_`) with an underscore (`_`),
- prefixing the name with an underscore (`_`) if it would otherwise start with
an ASCII digit.
- MUST be normalized consistently by `Get`, `Set`, and `Keys` operations:
- when injecting context, the carrier `Set` operation MUST write values using
the normalized form of the key provided by the propagator,
- when extracting context, the carrier `Get` operation MUST normalize the key
requested by the propagator and the key names present in the carrier before
matching them,
Comment thread
pellared marked this conversation as resolved.
Outdated
- when listing keys, the carrier `Keys` function MUST return normalized key
names.

For example, if a propagator requests the key `x-b3-traceid`, the environment
variable carrier MUST match it to the carrier key `X_B3_TRACEID`. It MUST also
match it to a carrier key such as `x-b3-traceid`, because both key names
normalize to `X_B3_TRACEID`.

> [!NOTE]
> This normalization is consistent with the environment variable naming rules
Expand Down
Loading