Skip to content

env var propagation carrier as Getter and Setter#47

Open
pellared wants to merge 10 commits intoopen-telemetry:mainfrom
pellared:env-var-propagation
Open

env var propagation carrier as Getter and Setter#47
pellared wants to merge 10 commits intoopen-telemetry:mainfrom
pellared:env-var-propagation

Conversation

@pellared
Copy link
Copy Markdown
Member

@pellared pellared commented Mar 30, 2026

Per:

This makes the environment variable propagation carrier to be composable with any propagator.

This should also make the implementation spec-compliant as I also implemented the key normalization.

Related to:

Disclaimer, I confess that I have never written a single line of code in Swift. I used Copilot and experience from other languages.

@pellared pellared marked this pull request as ready for review March 30, 2026 16:02
@pellared
Copy link
Copy Markdown
Member Author

FYI @open-telemetry/semconv-cicd-approvers

github-merge-queue bot pushed a commit to open-telemetry/opentelemetry-specification that referenced this pull request Apr 13, 2026
… environment variables (#5003)

Per
#4961 (comment)
and other similar feedback

## Changes

This PR removes the non-normative guidance that presented a dedicated
`EnvironmentContextPropagator` as a first-class alternative for
environment variable context propagation.

The supplementary guidance now describes the carrier-based pattern
directly:

- use the existing `TextMapPropagator` with environment-specific
carriers (`EnvironmentGetter` and `EnvironmentSetter`)
- reference the existing C++, Go, Java, and Python implementation (I
also created a PR for Swift that follows the same pattern
open-telemetry/opentelemetry-swift-core#47)

The previous (removed) “Approach 1” guidance suggested that a dedicated
environment-variable-specific propagator was a viable recommendation.
Based on the discussion in #4961, that approach is seen as
misleading/buggy:
- the environment variable carrier should remain format-agnostic
- propagator-specific behavior belongs in the propagator, not in the
carrier
- the Swift example did not reflect the direction we want to recommend
here

This change keeps the document aligned with the carrier-based model used
by the referenced implementations.

## Side note

I think we can look into stabilization of this document after this PR is
merged. I plan to create a stabilization issue and update the compliance
matrix.

---------

Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants