Skip to content

env var carrier must be part of OTel Core repo#5042

Open
pellared wants to merge 5 commits intoopen-telemetry:mainfrom
pellared:core-envcar
Open

env var carrier must be part of OTel Core repo#5042
pellared wants to merge 5 commits intoopen-telemetry:mainfrom
pellared:core-envcar

Conversation

@pellared
Copy link
Copy Markdown
Member

@pellared pellared commented Apr 21, 2026

Towards #5040

Clarify that the environment variable carrier implementation must be maintained and distributed as part of the Core OpenTelemetry repositories. I have used wording that I found in other parts of the spec. See #5042 (comment)

This is important because instrumentations that want to propagate context through environment variables should be able to reuse a common carrier implementation instead of re-creating their own. Making it a core component gives users and instrumentation authors something stable and reliable to depend on, improves consistency across languages, and reduces the risk of fragmented or incompatible implementations.

@pellared pellared marked this pull request as ready for review April 21, 2026 14:55
@pellared pellared requested review from a team as code owners April 21, 2026 14:55
@pellared
Copy link
Copy Markdown
Member Author

CC @open-telemetry/semconv-cicd-approvers

Comment thread specification/context/env-carriers.md Outdated
@pellared pellared requested a review from kamphaus April 21, 2026 15:24
Comment thread specification/context/env-carriers.md Outdated
Co-authored-by: Christophe Kamphaus <christophe.kamphaus@gmail.com>
@pellared pellared requested a review from kamphaus April 21, 2026 15:27
Comment thread CHANGELOG.md
Co-authored-by: Armin Ruech <7052238+arminru@users.noreply.github.com>
@pellared pellared requested a review from arminru April 21, 2026 17:54
- applying any truncation or other format-specific behaviors

Environment variable carrier implementation SHOULD be maintained and distributed
as part of the Core OpenTelemetry repositories.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I agree with the sentiment. Do we use this language about "core" anyway else? I imagine core means different things for different language sigs based on how they've designed their artifact topology, which is fine and expected.

I would expect the carrier implementation to be in the same artifact that holds w3c trace, baggage propagators, and the core context implementation (i.e. APIs and implementation).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would expect the carrier implementation to be in the same artifact that holds w3c trace, baggage propagators, and the core context implementation (i.e. APIs and implementation).

Based on the discussion #5042 (comment) I think artifact is not the concern here. The repo is what we're trying to clarify.

@pellared pellared requested a review from jack-berg April 21, 2026 18:00
@reyang
Copy link
Copy Markdown
Member

reyang commented Apr 21, 2026

@pellared I don't quite understand what is/are "Core OpenTelemetry repositories".

I think the spec has a position - anything in the spec should be in the opentelemetry-language repo, anything that is not in the spec can/should go to the opentelemetry-language-contrib repo. Is this your understanding as well?

Here is my understanding:

  1. OpenTelemetry API
  2. OpenTelemetry SDK
  3. Plugins (e.g. exporters, propagators, samplers, etc.) that are covered by the OpenTelemetry Specification
  4. Anything that is not covered by the OpenTelemetry Specification

1 and 4 are very clear.
The maintainers of each implementation SIG can decide if they want to bundle 2 and 3 in a single artifact, or they want to implement them as a "core" SDK and a set of optional plugins.

Copy link
Copy Markdown
Member

@reyang reyang left a comment

Choose a reason for hiding this comment

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

Blocking for now since it is unclear whether we're talking about repositories or artifacts. Also, it is unclear what does "OTel Core" mean.

@pellared
Copy link
Copy Markdown
Member Author

pellared commented Apr 21, 2026

I think the spec has a position - anything in the spec should be in the opentelemetry-language repo, anything that is not in the spec can/should go to the opentelemetry-language-contrib repo. Is this your understanding as well?

Here is my understanding:

  1. OpenTelemetry API
  2. OpenTelemetry SDK
  3. Plugins (e.g. exporters, propagators, samplers, etc.) that are covered by the OpenTelemetry Specification
  4. Anything that is not covered by the OpenTelemetry Specification

This is not what the specification says. From https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/overview.md#contrib-packages:

Some plugins, such as OTLP Exporters and TraceContext Propagators, are required by the OpenTelemetry specification. These required plugins are included as part of the SDK.

Plugins and instrumentation packages which are optional and separate from the SDK are referred to as Contrib packages. API Contrib refers to packages which depend solely upon the API; SDK Contrib refers to packages which also depend upon the SDK.

The term Contrib specifically refers to the collection of plugins and instrumentation maintained by the OpenTelemetry project; it does not refer to third-party plugins hosted elsewhere.

The specification explicitly defines that optional plugins are Contrib. We follow this in OTel Go.

Also the specification clearly says that carrier is not API. This is a "plugin". While the "Core repository" is not defined it is used in other places as I mentioned in #5042 (comment).

Blocking for now since it is unclear whether we're talking about repositories or artifacts. Also, it is unclear what does "OTel Core" mean.

What is your proposal? Do we need to define "OTel Core repository" and "OTel Contrib repository" in the specification beforehand to unblock this PR?

@pellared pellared requested a review from reyang April 21, 2026 18:30
@pellared pellared changed the title env var carrier should be part of OTel Core env var carrier should be part of OTel Core repo Apr 21, 2026
@reyang
Copy link
Copy Markdown
Member

reyang commented Apr 21, 2026

This is not what the specification says. From https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/overview.md#contrib-packages:

Some plugins, such as OTLP Exporters and TraceContext Propagators, are required by the OpenTelemetry specification. These required plugins are included as part of the SDK.
Plugins and instrumentation packages which are optional and separate from the SDK are referred to as Contrib packages. API Contrib refers to packages which depend solely upon the API; SDK Contrib refers to packages which also depend upon the SDK.
The term Contrib specifically refers to the collection of plugins and instrumentation maintained by the OpenTelemetry project; it does not refer to third-party plugins hosted elsewhere.

Would you elaborate what's your concern here? I think this is clear to me. For example, Prometheus Exporter is part of the metrics SDK spec, it is implemented as part of the SDK (not necessarily in a single monolithic binary artifact though), you as maintainer can decide whether you bundle it in the SDK (which doesn't make a lot of sense to me) or you provide it as a package (which I believe most SIGs do), but it will be in the opentelemetry-language repo rather than the opentelemetry-language-contrib repo.

@pellared
Copy link
Copy Markdown
Member Author

pellared commented Apr 21, 2026

@reyang, my concern is that the specification does not say that environment variable propopagion carrier should be part of the opentelemetry-language repo.

Some plugins, such as OTLP Exporters and TraceContext Propagators, are required by the OpenTelemetry specification. These required plugins are included as part of the SDK.

What is the way in the specification to say that a component is required by the specification? I do not think that there is any rule saying that it something is not explicitly optional then it is required. The only rule I found is https://github.com/open-telemetry/opentelemetry-specification/tree/main/specification#notation-conventions-and-compliance:

Conversely, an implementation of the specification is compliant if it satisfies all the "MUST", "MUST NOT", "REQUIRED", requirements defined in the specification.

Currently, the SIG can interpret it as an optional plugin and have it under Contrib.

Plugins and instrumentation packages which are optional and separate from the SDK are referred to as Contrib packages.

@reyang
Copy link
Copy Markdown
Member

reyang commented Apr 21, 2026

@reyang, my concern is that the specification does not say that environment variable propopagion carrier should be part of the opentelemetry-language repo.

Some plugins, such as OTLP Exporters and TraceContext Propagators, are required by the OpenTelemetry specification. These required plugins are included as part of the SDK.

What is the way in the specification to say that a component is required by the specification? Do we have some rule that it something is not explicitly optional then it is recommended?

Currently, the SIG can interpret it as an optional plugin and have it under Contrib.

Plugins and instrumentation packages which are optional and separate from the SDK are referred to as Contrib packages.

Got it, thanks!

I think we should clarify that everything required by the specification needs to happen in the opentelemetry-language repository rather than the opentelemetry-language-contrib repository. Do folks agree?

@pellared
Copy link
Copy Markdown
Member Author

@reyang

I think we should clarify that everything required by the specification needs to happen in the opentelemetry-language repository rather than the opentelemetry-language-contrib repository. Do folks agree?

Please create a separate issue for it.

Why? Personally, I am not sure if this is change is going to be welcome.
In OTel Go we have a lot of optional components that are defined in the spec in the Contrib repo:

There may be many reasons why it may be preferred, but this is something that should be discussed separately.

PS. I changed SHOULD to MUST as I think there is a strong preference to have it in the "Core" repo: be61465

@pellared pellared changed the title env var carrier should be part of OTel Core repo env var carrier must be part of OTel Core repo Apr 21, 2026
- validating and parsing values
- applying any truncation or other format-specific behaviors

Environment variable carrier implementation MUST be maintained and distributed
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If we don't implement it within this PR, it would be helpful in a subsequent PR to include a footnote linking to w/e the definition of a Core OpenTelemetry repository is.

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.

6 participants