Skip to content

feat(propagation): Support environment variable propagation#3587

Draft
9999years wants to merge 1 commit into
open-telemetry:mainfrom
9999years:wiggles/klyy
Draft

feat(propagation): Support environment variable propagation#3587
9999years wants to merge 1 commit into
open-telemetry:mainfrom
9999years:wiggles/klyy

Conversation

@9999years

Copy link
Copy Markdown
Contributor

Fixes: #3285

Changes

Adds opentelemetry::propagation::environment::{EnvironmentExtractor, EnvironmentInjector} to propagate context across process boundaries, gated on an unstable experimental_propagation_env_carrier feature flag, matching the Python/Java/Go SDKs.

This can be used like:

let context: Context = TraceContextPropagator::new().extract(&EnvironmentExtractor::new());

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

Fixes: open-telemetry#3285

Adds `opentelemetry::propagation::environment::{EnvironmentExtractor,
EnvironmentInjector}` to propagate context across process boundaries,
gated on an unstable `experimental_propagation_env_carrier` feature
flag, matching the Python/Java/Go SDKs.

This can be used like:

```rust
let context: Context = TraceContextPropagator::new().extract(&EnvironmentExtractor::new());
```
@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.07692% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.2%. Comparing base (95c1d4b) to head (2629cdf).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
opentelemetry/src/propagation/environment.rs 93.0% 9 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##            main   #3587    +/-   ##
======================================
  Coverage   83.2%   83.2%            
======================================
  Files        130     131     +1     
  Lines      28232   28362   +130     
======================================
+ Hits       23491   23612   +121     
- Misses      4741    4750     +9     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

9999years added a commit to MercuryTechnologies/buck2 that referenced this pull request Jul 7, 2026
This integrates the Mercury `opentelemetry-rust` fork with fixes from a
couple PRs:

See:
- open-telemetry/opentelemetry-rust#3586
- open-telemetry/opentelemetry-rust#3587

Follow-up to Arian's review: #18 (review)
9999years added a commit to MercuryTechnologies/buck2 that referenced this pull request Jul 7, 2026
This integrates the Mercury `opentelemetry-rust` fork with fixes from a
couple PRs:

See:
- open-telemetry/opentelemetry-rust#3586
- open-telemetry/opentelemetry-rust#3587

Follow-up to Arian's review: #18 (review)
9999years added a commit to MercuryTechnologies/buck2 that referenced this pull request Jul 8, 2026
This integrates the Mercury `opentelemetry-rust` fork with fixes from a
couple PRs:

See:
- open-telemetry/opentelemetry-rust#3586
- open-telemetry/opentelemetry-rust#3587

Follow-up to Arian's review: #18 (review)
hdgarrood pushed a commit to MercuryTechnologies/buck2 that referenced this pull request Jul 10, 2026
This integrates the Mercury `opentelemetry-rust` fork with fixes from a
couple PRs:

See:
- open-telemetry/opentelemetry-rust#3586
- open-telemetry/opentelemetry-rust#3587

Follow-up to Arian's review: #18 (review)
hdgarrood pushed a commit to MercuryTechnologies/buck2 that referenced this pull request Jul 11, 2026
This integrates the Mercury `opentelemetry-rust` fork with fixes from a
couple PRs:

See:
- open-telemetry/opentelemetry-rust#3586
- open-telemetry/opentelemetry-rust#3587

Follow-up to Arian's review: #18 (review)
hdgarrood pushed a commit to MercuryTechnologies/buck2 that referenced this pull request Jul 11, 2026
This integrates the Mercury `opentelemetry-rust` fork with fixes from a
couple PRs:

See:
- open-telemetry/opentelemetry-rust#3586
- open-telemetry/opentelemetry-rust#3587

Follow-up to Arian's review: #18 (review)
hdgarrood pushed a commit to MercuryTechnologies/buck2 that referenced this pull request Jul 15, 2026
This integrates the Mercury `opentelemetry-rust` fork with fixes from a
couple PRs:

See:
- open-telemetry/opentelemetry-rust#3586
- open-telemetry/opentelemetry-rust#3587

Follow-up to Arian's review: #18 (review)
hdgarrood pushed a commit to MercuryTechnologies/buck2 that referenced this pull request Jul 15, 2026
This integrates the Mercury `opentelemetry-rust` fork with fixes from a
couple PRs:

See:
- open-telemetry/opentelemetry-rust#3586
- open-telemetry/opentelemetry-rust#3587

Follow-up to Arian's review: #18 (review)
hdgarrood pushed a commit to MercuryTechnologies/buck2 that referenced this pull request Jul 15, 2026
This integrates the Mercury `opentelemetry-rust` fork with fixes from a
couple PRs:

See:
- open-telemetry/opentelemetry-rust#3586
- open-telemetry/opentelemetry-rust#3587

Follow-up to Arian's review: #18 (review)
@github-actions

Copy link
Copy Markdown

Thank you for your contribution! This PR has been automatically marked as stale because it has not had activity in the last 14 days. This may be due to a delay in review on our side or awaiting a response from you; either is fine, and we appreciate your patience.

It will be closed in 14 days if no further activity occurs. Pushing a new commit or leaving a comment will remove the stale label and keep the PR open.

@github-actions github-actions Bot added the Stale label Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Support the environment variable propagation spec in Rust

1 participant