Skip to content

test(rust): enable passing ot.th/ot.rv tracestate sampling scenarios [rust@milan.garnier/otel-consistent-sampling] - #7391

Draft
MilanGarnier wants to merge 2 commits into
ben.db/feat-otel-tracestate-sampling-scaffoldingfrom
milan.garnier/feat-rs-ot.th
Draft

test(rust): enable passing ot.th/ot.rv tracestate sampling scenarios [rust@milan.garnier/otel-consistent-sampling]#7391
MilanGarnier wants to merge 2 commits into
ben.db/feat-otel-tracestate-sampling-scaffoldingfrom
milan.garnier/feat-rs-ot.th

Conversation

@MilanGarnier

@MilanGarnier MilanGarnier commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Motivation

Stacked on #7372 (the ot.th/ot.rv conformance scaffolding). Enables the Rust entries against dd-trace-rs's wire implementation (branch milan.garnier/otel-tracestate-ot-th), verified locally against a rust@0.5.1-dev+c36937d build (axum weblog) across every scenario (DEFAULT + all five sample-rate scenarios).

What does this PR do?

Flips all tests/test_otel_tracestate_sampling.py Rust entries from missing_feature to >=0.5.0-dev in manifests/rust.yml, and backfills 3 previously-unlisted classes (Test_ForwardInboundOtUnchangedWhenDropped, Test_ThOnlyDoesNotFabricateRv, Test_ThOnlyDoesNotFabricateRvWhenDropped) as missing_feature across the other 8 language manifests to preserve the "disabled for every tracer until it ships" invariant. OTLP entries (test_tracing_otlp.py, APMAPI-2172) are untouched per scope.

Local verification results (ai generated draft not reviewed)

  • DEFAULT scenario: 6/9 selected tests pass. The 3 Test_ForceKeepClearsTh (A4) sub-tests fail, but not because of an ot.th gap: the local weblog used for verification (a not-yet-merged Rust Axum weblog) has no AppSec/WAF integration, so the Arachni-user-agent-triggered force-keep this test relies on never fires. The underlying "clear th, forward inherited rv" wire logic it exercises is already unit-tested and passing (tracecontext.rs::force_keep_clears_th_forwards_rv).
  • Rate scenarios: only SAMPLING (rate 0.5) passes outright. OTEL_SAMPLING_RATE_0_01/0_1/0_2/0_99 all fail on a th mismatch of a few ULPs against TH_BY_RATE — two independent rounding bugs, not one:
    • TH_BY_RATE[0.1] in the test fixture itself is stale (e6666666666668); the exact-fraction value is e6666666666666, which matches both what Rust emits and dd-trace-rs's own corrected example.
    • For rate 0.01, Rust emits one ULP above the exact-fraction floor (fd70a3d70a3d71 vs fd70a3d70a3d70) — a rounding discrepancy in the unreleased libdd-sampling::OtelConsistentSampling threshold computation dd-trace-rs depends on, not in dd-trace-rs itself.

Both issues need a fix (one in this repo's fixture, one upstream in libdatadog) before these entries are actually green. Opening as draft now since the manifest/scope work itself is done and the base branch is expected to move; will flip out of draft once the rounding fixes land and a clean local rerun confirms all scenarios pass.

Base

Targets ben.db/feat-otel-tracestate-sampling-scaffolding (stacked). Retarget to main once #7372 merges.

Stacked on #7372 (the ot.th/ot.rv conformance scaffolding). Flips the
Rust entries in manifests/rust.yml from missing_feature to
'>=0.5.0-dev' and backfills the 3 previously-unlisted classes
(Test_ForwardInboundOtUnchangedWhenDropped, Test_ThOnlyDoesNotFabricateRv,
Test_ThOnlyDoesNotFabricateRvWhenDropped) as missing_feature across the
other 8 manifests to keep the "disabled for every tracer" invariant
intact until each ships. OTLP entries (APMAPI-2172) are left untouched.
@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

manifests/rust.yml                                                      @DataDog/apm-rust

@datadog-official

datadog-official Bot commented Jul 27, 2026

Copy link
Copy Markdown

Pipelines  Tests

⚠️ Warnings

🚦 65 Pipeline jobs failed

DataDog/system-tests | Amazon_Linux_2023_amd64.CON: [test-app-ruby-container]   View in Datadog   GitLab

DataDog/system-tests | Amazon_Linux_2_arm64.INS: [test-app-ruby-container]   View in Datadog   GitLab

DataDog/system-tests | Debian_11_amd64.INS: [test-app-ruby-container]   View in Datadog   GitLab

View all 65 failed jobs.

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🔄 Datadog auto-retried 101 jobs - 67 passed on retry View in Datadog

Useful? React with 👍 / 👎

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

@MilanGarnier MilanGarnier changed the title test(rust): enable passing ot.th/ot.rv tracestate sampling scenarios test(rust): enable passing ot.th/ot.rv tracestate sampling scenarios [rust@milan.garnier/otel-consistent-sampling] Jul 28, 2026
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.

1 participant