Skip to content

Align environment variable propagation names with POSIX and define normalization rules#4944

Open
pellared wants to merge 7 commits intoopen-telemetry:mainfrom
pellared:env-car-normalization
Open

Align environment variable propagation names with POSIX and define normalization rules#4944
pellared wants to merge 7 commits intoopen-telemetry:mainfrom
pellared:env-car-normalization

Conversation

@pellared
Copy link
Member

@pellared pellared commented Mar 13, 2026

This PR aligns environment variable context propagation naming with POSIX.1-2024 and defines normalization rules for propagation keys.

Fixes #4914

Prototype open-telemetry/opentelemetry-go-contrib#8678

Note that the changes are in a document which has status "Alpha".

Motivation

The current text refers to platform-specific restrictions but does not define how invalid propagation keys should be handled. In particular, it does not clearly address cases such as:

Changes

Propagation keys MUST be normalized to valid environment variable names by:

  • converting ASCII letters to uppercase
  • replacing disallowed characters with _
  • prefixing _ when the name would otherwise begin with a digit

Benefits

  • Defines deterministic behavior across SDKs
  • Improves interoperability between propagators (e.g., W3C and B3)
  • Reduces implementation ambiguity
  • Aligns with POSIX.1-2024

@pellared pellared changed the title Align environment variable context propagation name restrictions with POSIX.1-2024 Align environment variable propagation names with POSIX and define normalization rules Mar 13, 2026
@pellared
Copy link
Member Author

CC @open-telemetry/semconv-cicd-approvers

@pellared pellared marked this pull request as ready for review March 13, 2026 20:15
@pellared pellared requested review from a team as code owners March 13, 2026 20:15
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
@pellared pellared added enhancement New feature or request spec:context Related to the specification/context directory labels Mar 13, 2026
Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request spec:context Related to the specification/context directory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refine key normalization for Environment Variables Context Propagation Carrier

5 participants