Commit 289d789
authored
Clarify environment carrier key normalization behavior (open-telemetry#5102)
Towards
open-telemetry#5040
## Changes
Clarifies the environment variable propagation carrier key normalization
requirements:
- `Set` writes values using normalized key names.
- `Get` normalizes both the requested propagator key and carrier keys
before matching.
- `Keys` returns normalized key names.
## Motivation
The existing text defined how key names are normalized, but it did not
explicitly say where that normalization applies. This PR clarifies that
normalization is part of the carrier behavior for writing, reading, and
listing keys.
This follows the robustness principle: carriers write the normalized
representation, while getters can still accept a non-normalized
environment variable key if it normalizes to the requested propagation
key. For example, a non-normalized `traceparent` environment variable
can still be used by the propagation getter when matching `TRACEPARENT`.
This retrospects
open-telemetry#4944 (comment)
now that implementations are in place.
## Implementation references
- Go:
open-telemetry/opentelemetry-go-contrib#8761
- .NET: open-telemetry/opentelemetry-dotnet#7174
- Java: open-telemetry/opentelemetry-java#8233
- Python:
open-telemetry/opentelemetry-python#5119
- Swift:
open-telemetry/opentelemetry-swift-core#47
Related Java discussion:
open-telemetry/opentelemetry-java#8233 (comment)1 parent 04c76c2 commit 289d789
2 files changed
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
69 | 84 | | |
70 | 85 | | |
71 | 86 | | |
| |||
0 commit comments