Repository navigation
Support OpenTelemetry consistent tracestate sampling - #12397
Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 39 commits intoSep 29, 2026
Merged
Conversation
Contributor
Contributor
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
MilanGarnier
force-pushed
the
milan.garnier/ot.th
branch
from
September 3, 2026 13:58
3643548 to
2f90ba6
Compare
MilanGarnier
changed the base branch from
master
to
milan.garnier/preserve-deterministic-sampler-rate
September 3, 2026 13:59
Base automatically changed from
milan.garnier/preserve-deterministic-sampler-rate
to
master
September 3, 2026 18:45
MilanGarnier
force-pushed
the
milan.garnier/ot.th
branch
from
September 4, 2026 09:29
a168627 to
9e2422a
Compare
3 tasks done
MilanGarnier
changed the base branch from
master
to
milan.garnier/otel-tracestate-refactor
September 4, 2026 09:30
MilanGarnier
force-pushed
the
milan.garnier/ot.th
branch
5 times, most recently
from
September 8, 2026 14:26
7a1ddea to
a0176c9
Compare
This comment was marked as resolved.
This comment was marked as resolved.
MilanGarnier
marked this pull request as ready for review
September 10, 2026 09:02
MilanGarnier
force-pushed
the
milan.garnier/otel-tracestate-refactor
branch
from
September 10, 2026 09:02
db321c0 to
1c02400
Compare
MilanGarnier
force-pushed
the
milan.garnier/ot.th
branch
from
September 10, 2026 09:02
3c81345 to
629892d
Compare
MilanGarnier
force-pushed
the
milan.garnier/ot.th
branch
from
September 11, 2026 13:28
d5a6721 to
eb4c156
Compare
mcculls
force-pushed
the
milan.garnier/ot.th
branch
from
September 28, 2026 22:24
ea1fb86 to
cdde406
Compare
mcculls
approved these changes
Sep 28, 2026
MilanGarnier
enabled auto-merge
September 29, 2026 09:45
MilanGarnier
disabled auto-merge
September 29, 2026 09:45
MilanGarnier
enabled auto-merge
September 29, 2026 09:45
Contributor
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Sep 29, 2026
This was referenced Oct 16, 2026
Flag code a change carries into a hotter context, and weight header paths up (AI perf review)
#12902
Open
dougqh
added a commit
that referenced
this pull request
Oct 21, 2026
…hape cost SamplingDecisionBenchmark gains arms that follow a probability decision with the Datadog header, the W3C tracestate header and the OTLP tracestate, so the deferred OtelTraceState is measured where it's built or skipped. ServiceShapePropagationBenchmark measures head, leaf and intermediate services with a default-configured tracer. It only uses API unchanged since v1.66.0, so it can be built onto release tags to put a cost on #12397. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dougqh
added a commit
that referenced
this pull request
Oct 22, 2026
…ported (#12982) * Defer building the OpenTelemetry tracestate for fresh probability decisions Every root probability decision built an OtelTraceState inside the sampling lock, though only W3C injection and OTLP export read it. Install a ProbabilitySamplingState that keeps the trace id bits and rate, and builds the ot member on first read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Clarify why lazy otel state readers agree on one instance Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Add benchmarks for the lazy otel state's inject, export and service-shape cost SamplingDecisionBenchmark gains arms that follow a probability decision with the Datadog header, the W3C tracestate header and the OTLP tracestate, so the deferred OtelTraceState is measured where it's built or skipped. ServiceShapePropagationBenchmark measures head, leaf and intermediate services with a default-configured tracer. It only uses API unchanged since v1.66.0, so it can be built onto release tags to put a cost on #12397. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Rename ServiceShapePropagationBenchmark to PropagationScenariosBenchmark Describe it as a scenario benchmark: each arm is a whole request driven through the tracer's public API, rather than one method in isolation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Test that racing readers get one OpenTelemetry state instance Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
gh-worker-dd-mergequeue-cf854d Bot
pushed a commit
that referenced
this pull request
Oct 22, 2026
…etry tracestate (#12981) Precompute decision maker tag values per sampling mechanism Every keep decision built "-" + samplingMechanism and then validated, hashed and looked it up in TagValue's cache. The mechanisms are a small fixed set, so build their TagValues once and index by mechanism, falling back to TagValue.from for anything beyond the table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Add a sampling decision benchmark Measures the per-trace propagation-tag bookkeeping done on a root sampling decision, both in a bare start/sample/finish span and on fresh PropagationTags with no span around it, for the default, rule and manual keep paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Defer building the OpenTelemetry tracestate until it's injected or exported (#12982) * Defer building the OpenTelemetry tracestate for fresh probability decisions Every root probability decision built an OtelTraceState inside the sampling lock, though only W3C injection and OTLP export read it. Install a ProbabilitySamplingState that keeps the trace id bits and rate, and builds the ot member on first read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Clarify why lazy otel state readers agree on one instance Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Add benchmarks for the lazy otel state's inject, export and service-shape cost SamplingDecisionBenchmark gains arms that follow a probability decision with the Datadog header, the W3C tracestate header and the OTLP tracestate, so the deferred OtelTraceState is measured where it's built or skipped. ServiceShapePropagationBenchmark measures head, leaf and intermediate services with a default-configured tracer. It only uses API unchanged since v1.66.0, so it can be built onto release tags to put a cost on #12397. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Rename ServiceShapePropagationBenchmark to PropagationScenariosBenchmark Describe it as a scenario benchmark: each arm is a whole request driven through the tracer's public API, rather than one method in isolation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Test that racing readers get one OpenTelemetry state instance Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: devflow.devflow-routing-intake <devflow.devflow-routing-intake@kubernetes.us1.ddbuild.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Does This Do
Implements OpenTelemetry consistent probability sampling with the
ottracestate member.
rvandthfor agent-rateand rule-based sampling (and forwards them is they were extracted and valid).
probability state.
otfields, rebuilding W3C tracestatewithin its member and size limits while preserving unmanaged vendor members.
together so W3C injection and OTLP JSON/protobuf export use one decision.
Adds coverage for parsing and normalization, W3C extraction and
reinjection, sampling decisions and overrides, Org Guard, and OTLP export.
Motivation
OpenTelemetry consistent probability sampling lets tracers make compatible
sampling decisions using a shared random value and threshold. The Java tracer
needs to retain compatible inbound state and publish locally made probability
decisions without conflicting with Datadog sampling behavior.
Additional Notes
ottracestate parser added in Parse OpenTelemetry tracestate member #12405, which has merged.DataDog/system-tests#7649.
Contributor Checklist
type:andcomp:labels.Jira ticket: APMAPI-2171