Skip to content

fix(rust/parametric): report effective propagation style in /trace/config#7241

Draft
bm1549 wants to merge 1 commit into
mainfrom
brian.marks/otel-propagators
Draft

fix(rust/parametric): report effective propagation style in /trace/config#7241
bm1549 wants to merge 1 commit into
mainfrom
brian.marks/otel-propagators

Conversation

@bm1549

@bm1549 bm1549 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Motivation

The Rust parametric app's GET /trace/config reported the propagation style from the extract-specific config only, so a global-only style — including one fed by OTEL_PROPAGATORS or a bare DD_TRACE_PROPAGATION_STYLE — was reported as empty. This is the companion to DataDog/dd-trace-rs#271, which adds OTEL_PROPAGATORS support to dd-trace-rs.

Changes

format_trace_propagation_extract in the Rust parametric app now falls back to the global propagation style when the extract-specific style is unset, mirroring the library's effective-extractor resolution (propagation/config.rs::get_extractors): extract-specific styles if set, otherwise the global style. One function, four added lines.

Verified locally with cargo check against a linked dd-trace-rs source (the type signatures compose: both getters return Option<&[TracePropagationStyle]>).

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • Anything but tests/ or manifests/ is modified ? I have the approval from R&P team
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added, removed or renamed?

🤖 Generated with Claude Code

…nfig

Mirror the library's effective-extractor resolution: use the extract-specific
styles when set, otherwise fall back to the global propagation style
(which is what OTEL_PROPAGATORS and a bare DD_TRACE_PROPAGATION_STYLE feed).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@bm1549 bm1549 added the ai-generated The pull request includes a significant amount of AI-generated code label Jun 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

utils/build/docker/rust/parametric/src/datadog/dto.rs                   @DataDog/apm-rust @DataDog/system-tests-core

@datadog-official

datadog-official Bot commented Jun 30, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 9f400e9 | Docs | Datadog PR Page | Give us feedback!

gh-worker-dd-mergequeue-cf854d Bot pushed a commit to DataDog/dd-trace-rs that referenced this pull request Jul 6, 2026
…271)

# What does this PR do?

Adds support for the OpenTelemetry `OTEL_PROPAGATORS` env var as a fallback for `DD_TRACE_PROPAGATION_STYLE`. When `DD_TRACE_PROPAGATION_STYLE` is unset, dd-trace-rs reads `OTEL_PROPAGATORS` and applies it to the global propagation style, matching the other Datadog tracers (Python, Go, Java, Node.js, .NET, Ruby, PHP).

It reuses the existing `update_non_empty_string_with_fallback` helper (the one behind the `OTEL_SERVICE_NAME` alias), so only the global style is wired; extract/inject inherit it through the existing fallback in `propagation/config.rs`. Supported values: `datadog`, `tracecontext`, `baggage`, `b3` (single-header), `b3multi`, `none`. Unsupported OpenTelemetry propagators (`jaeger`, `xray`, `ottrace`) are dropped with a warning. `DD_TRACE_PROPAGATION_STYLE` wins when both are set.

# Motivation

Users who configure propagation via `OTEL_PROPAGATORS` expect dd-trace-rs to honor it the way the other tracers do. It was the only tracer (besides dd-trace-cpp) missing it.

# Additional Notes

- An empty `DD_TRACE_PROPAGATION_STYLE=""` is now treated as unset (falls back to `OTEL_PROPAGATORS`, then the default), consistent with the `OTEL_SERVICE_NAME` fallback.
- Companion system-tests PR: DataDog/system-tests#7241.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


Co-authored-by: brian.marks <brian.marks@datadoghq.com>
Aaalibaba42 pushed a commit to DataDog/dd-trace-rs that referenced this pull request Jul 8, 2026
…271)

# What does this PR do?

Adds support for the OpenTelemetry `OTEL_PROPAGATORS` env var as a fallback for `DD_TRACE_PROPAGATION_STYLE`. When `DD_TRACE_PROPAGATION_STYLE` is unset, dd-trace-rs reads `OTEL_PROPAGATORS` and applies it to the global propagation style, matching the other Datadog tracers (Python, Go, Java, Node.js, .NET, Ruby, PHP).

It reuses the existing `update_non_empty_string_with_fallback` helper (the one behind the `OTEL_SERVICE_NAME` alias), so only the global style is wired; extract/inject inherit it through the existing fallback in `propagation/config.rs`. Supported values: `datadog`, `tracecontext`, `baggage`, `b3` (single-header), `b3multi`, `none`. Unsupported OpenTelemetry propagators (`jaeger`, `xray`, `ottrace`) are dropped with a warning. `DD_TRACE_PROPAGATION_STYLE` wins when both are set.

# Motivation

Users who configure propagation via `OTEL_PROPAGATORS` expect dd-trace-rs to honor it the way the other tracers do. It was the only tracer (besides dd-trace-cpp) missing it.

# Additional Notes

- An empty `DD_TRACE_PROPAGATION_STYLE=""` is now treated as unset (falls back to `OTEL_PROPAGATORS`, then the default), consistent with the `OTEL_SERVICE_NAME` fallback.
- Companion system-tests PR: DataDog/system-tests#7241.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


Co-authored-by: brian.marks <brian.marks@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-generated The pull request includes a significant amount of AI-generated code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant