Skip to content

Commit 457c471

Browse files
bm1549claude
andcommitted
fix: add t.ksr to expected tracestate in OT compatibility tests
The _dd.p.ksr propagated tag also appears in W3C tracestate as t.ksr. Update OT31 and OT33 test expectations for the UNSET context priority case where the agent-rate sampler runs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 636f028 commit 457c471

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

dd-trace-ot/src/ot31CompatibilityTest/groovy/OT31ApiTest.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ class OT31ApiTest extends DDSpecification {
101101
def effectiveSamplingMechanism = contextPriority == UNSET ? AGENT_RATE : samplingMechanism
102102
def expectedTracestate = "dd=s:${propagatedPriority};p:${DDSpanId.toHexStringPadded(spanId)}" +
103103
(propagatedPriority > 0 ? ";t.dm:-" + effectiveSamplingMechanism : "") +
104+
(contextPriority == UNSET ? ";t.ksr:1" : "") +
104105
";t.tid:${traceId.toHexStringPadded(32).substring(0, 16)}"
105106
def expectedTextMap = [
106107
"x-datadog-trace-id" : context.toTraceId(),

dd-trace-ot/src/ot33CompatibilityTest/groovy/OT33ApiTest.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ class OT33ApiTest extends DDSpecification {
9090
def effectiveSamplingMechanism = contextPriority == UNSET ? AGENT_RATE : samplingMechanism
9191
def expectedTracestate = "dd=s:${propagatedPriority};p:${DDSpanId.toHexStringPadded(spanId)}" +
9292
(propagatedPriority > 0 ? ";t.dm:-" + effectiveSamplingMechanism : "") +
93+
(contextPriority == UNSET ? ";t.ksr:1" : "") +
9394
";t.tid:${traceId.toHexStringPadded(32).substring(0, 16)}"
9495
def expectedTextMap = [
9596
"x-datadog-trace-id" : context.toTraceId(),

0 commit comments

Comments
 (0)