Skip to content

Feature/env propagator - #2110

Closed
Div95 wants to merge 7 commits into
open-telemetry:mainfrom
Div95:feature/env_propagator
Closed

Div95 wants to merge 7 commits into
open-telemetry:mainfrom
Div95:feature/env_propagator

Conversation

@Div95

@Div95 Div95 commented Sep 14, 2021

Copy link
Copy Markdown

Description

Extended opentelemetry-python to develop a propagator that helps in inter-process propagation of trace/baggage details in a particular format (b3/w3c/any other) using environment dictionary as the carrier.

Using environment dictionary as the carrier will help to connect batch processes.
For example: The environment dictionary containing trace/baggage details can be passed to the next process
in the subprocess call, thereby propagating the trace/baggage details across processes.

The propagator has dependency on opentelemetry-api.

Relates to opentelemetry-specification issue #740

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

All the functions in the propagator have been tested using unittest library.

Following steps can be followed to run the tests:

  1. cd opentelemetry-python/propagator/opentelemetry-propagator-env
  2. Run the command to install the propagator in editable mode: pip install -e .[test]
    For z-shell, use the command: pip install -e ".[test]"
  3. Run the tests: python3 -m unittest
    Then you can uninstall the project by using the command: pip uninstall opentelemetry-propagator-env
    you could also run individual test files by using the command format: python3 -m unittest tests.<test_file_name>.<test_file_class>

Does This PR Require a Contrib Repo Change?

Answer the following question based on these examples of changes that would require a Contrib Repo Change:

  • The OTel specification has changed which prompted this PR to update the method interfaces of opentelemetry-api/ or opentelemetry-sdk/

  • The method interfaces of opentelemetry-instrumentation/ have changed

  • The method interfaces of test/util have changed

  • Scripts in scripts/ that were copied over to the Contrib repo have changed

  • Configuration files that were copied over to the Contrib repo have changed (when consistency between repositories is applicable) such as in

    • pyproject.toml
    • isort.cfg
    • .flake8
  • When a new .github/CODEOWNER is added

  • Major changes to project information, such as in:

    • README.md
    • CONTRIBUTING.md
  • Yes. - Link to PR:

  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@Div95
Div95 requested a review from a team September 14, 2021 00:57
@linux-foundation-easycla

linux-foundation-easycla Bot commented Sep 14, 2021

Copy link
Copy Markdown

CLA Signed

The committers are authorized under a signed CLA.

@owais

owais commented Sep 14, 2021

Copy link
Copy Markdown
Contributor

Thanks @Div95. We'll have to wait till this is added to the spec.

@owais owais added the blocked by spec Needs updates to Otel spec label Sep 14, 2021
@Div95

Div95 commented Sep 14, 2021

Copy link
Copy Markdown
Author

Thanks @Div95. We'll have to wait till this is added to the spec.

Ok sure. Is it ok to leave this PR open till then?

@owais
owais marked this pull request as draft September 25, 2021 00:43
@owais

owais commented Sep 25, 2021

Copy link
Copy Markdown
Contributor

@Div95 I moved this to drafts. You can re-open this when it is ready for review.

@Div95
Div95 marked this pull request as ready for review November 1, 2021 19:22
@Div95
Div95 marked this pull request as draft November 1, 2021 19:26
@StephenWithPH

Copy link
Copy Markdown

@owais @Div95 at long last, the spec PR merged (open-telemetry/opentelemetry-specification#4454) and the issue is closed (open-telemetry/opentelemetry-specification#740).

Do you have time to revive this PR?

Note that this may cross over with #4609 , which is linked from https://opentelemetry.io/docs/specs/otel/context/env-carriers/#approach-2-using-the-carriers-directly-through-setters-and-getters

@carlosalberto

Copy link
Copy Markdown
Contributor

As #4609 as been merged and using a dedicated Propagator has been removed as an option to support env vars propagation, I suggest this is closed @open-telemetry/python-maintainers

@ocelotl

ocelotl commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

I asked Claude to review this PR and Claude suggests it be closed with this explanation:

The env-var propagation this PR adds has already shipped through a different, spec-aligned approach. #4609 ("[carriers] add env carrier") was merged on 2026-02-11, and the dedicated-Propagator approach this PR implements was removed as a supported option from the specification in open-telemetry/opentelemetry-specification#5003.

To guard against a mistaken suggestion, Claude then independently re-verified this conclusion:

Verified against current main: #4609 is merged (the env carrier implementation is present) and spec PR open-telemetry/opentelemetry-specification#5003 (removing the dedicated-propagator option) is merged. A maintainer (@carlosalberto) has already explicitly requested closure on exactly this basis in this thread (2026-06-26).

Claude evaluated this PR with high confidence that it can be closed.

Claude has classified this PR as superseded — the feature shipped via a different, spec-aligned approach and the approach in this PR was removed from the spec.

The intention of this comment is to make it easier for a human being to review this PR before making a decision.

@opentelemetry-pr-dashboard

Copy link
Copy Markdown

Pull request dashboard status

Waiting on the author · refreshed 2026-08-14 16:51 UTC

Move out of draft to request review.

Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

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

Labels

blocked by spec Needs updates to Otel spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants