Skip to content

Add _dd.p.ksr propagated tag for Knuth sampling rate#10802

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 16 commits into
masterfrom
brian.marks/add-ksr-tag
Mar 20, 2026
Merged

Add _dd.p.ksr propagated tag for Knuth sampling rate#10802
gh-worker-dd-mergequeue-cf854d[bot] merged 16 commits into
masterfrom
brian.marks/add-ksr-tag

Conversation

@bm1549
Copy link
Copy Markdown
Contributor

@bm1549 bm1549 commented Mar 11, 2026

What Does This Do

Adds _dd.p.ksr (Knuth Sampling Rate) as a propagated tag set when agent-based or rule-based sampling decisions are made. The tag is stored in span meta (string type) with up to 6 significant digits and no trailing zeros. It propagates via x-datadog-tags header and W3C tracestate (t.ksr).

Motivation

To enable consistent sampling across tracers and backend retention filters, the backend needs to know the sampling rate applied by the tracer. Without transmitting the tracer's rate via _dd.p.ksr, backend resampling cannot correctly compute effective rates in multi-stage sampling scenarios.

See RFC: "Transmit Knuth sampling rate to backend"

Additional Notes

Key files changed:

  • DDSpan.javasetSamplingPriority() integration (decides when to set ksr)
  • PTagsFactory.javaformatKnuthSamplingRate(), updateKnuthSamplingRate(double), and static KSR cache
  • PropagationTags.java — Abstract API accepting raw double rate
  • PTagsCodec.java — Encoding/decoding ksr in x-datadog-tags header
  • KnuthSamplingRateTest.groovy — Unit tests for formatting, agent/rule sampling, propagation
  • KnuthSamplingRateFormatBenchmark.java — JMH benchmark comparing formatting approaches

Design decisions:

  • Formatting: formatKnuthSamplingRate uses manual char-array arithmetic instead of String.format to avoid Formatter/stream/boxing allocations (~130x faster on formatting, and 10x less allocation: 80 B/op → 0 B/op on the per-trace hot path)
  • Static KSR cache: updateKnuthSamplingRate checks a static volatile (double, TagValue) pair before formatting. Every new PTags instance starts with NaN, so without the cache each trace root would format even when the rate is constant. With the cache, the per-trace path is just 2 volatile reads after warmup — allocation-free regardless of JIT escape analysis behavior.
  • Eager TagValue caching: knuthSamplingRateTagValue is cached on PTags so getKnuthSamplingRateTagValue() on the header-injection hot path is a single volatile read (~0 allocation)
  • Ownership: formatting lives in the propagation layer (PTagsFactory), not in DDSpan, since _dd.p.ksr is a propagated tag

Benchmark results (8 threads, -prof gc):

Benchmark Allocation (B/op) Throughput
stringFormat (old String.format) 784–1,080 ~2.9M ops/s
customFormat (char-array, no cache) 80–88 ~370M ops/s
updateRateFreshTrace without static cache 80–88 (JIT-dependent) ~369M ops/s
updateRateFreshTrace with static cache ≈ 0 (structural) ~397M ops/s
cachedTagValue (injection hot path) ≈ 0 ~2B ops/s

The updateRateFreshTrace benchmark simulates per-trace cost: resets the instance cache (like a new PTags) then calls updateKnuthSamplingRate. Without the static cache, escape analysis may or may not eliminate the 80 B/op allocation depending on JIT mood. With the static cache, it's structurally zero after warmup.

Related PRs across tracers:

tag: no release note
tag: ai generated

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
bm1549 and others added 2 commits March 10, 2026 22:32
- Remove unused imports in KnuthSamplingRateTest (CodeNarc violations)
- Update OT31ApiTest and OT33ApiTest to expect _dd.p.ksr in
  x-datadog-tags when agent-rate sampler runs (UNSET priority)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
@bm1549 bm1549 added tag: ai generated Largely based on code generated by an AI or LLM comp: core Tracer core labels Mar 11, 2026
bm1549 and others added 5 commits March 10, 2026 22:47
Replace String#replaceAll (a forbidden API in this codebase) with
manual character-based trailing-zero stripping logic that has the
same semantics but avoids the regex-based method.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The PTagsCodec headerValue method outputs tags in order: dm, tid, ksr.
The test datadogTags list had ksr before tid, causing a comparison
failure. Reorder to match the actual output: dm, tid, ksr.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The ksr implementation now adds _dd.p.ksr tag to spans with agent
sampling rate, so the msgpack serialization test expectations need
to include it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- OpenTelemetryTest: fix x-datadog-tags ordering (tid before ksr)
- DatadogPropagatorTest: add ksr to expected tags when UNSET priority
- OpenTracing32Test: add ksr and tid handling for UNSET priority case

All follow PTagsCodec ordering: dm → tid → ksr

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update the test inject extract expectations to include _dd.p.ksr=1 in
x-datadog-tags and t.ksr:1 in tracestate for the UNSET sampling case,
following PTagsCodec ordering: dm -> tid -> ksr.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Mar 11, 2026

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master brian.marks/add-ksr-tag
git_commit_date 1773845838 1774020776
git_commit_sha a953f33 bcc0957
release_version 1.61.0-SNAPSHOT~a953f33c70 1.61.0-SNAPSHOT~bcc0957a74
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1774022874 1774022874
ci_job_id 1526095927 1526095927
ci_pipeline_id 103752945 103752945
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-x083vipj 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-x083vipj 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
module Agent Agent
parent None None

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 60 metrics, 11 unstable metrics.

Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.61.0-SNAPSHOT~bcc0957a74, baseline=1.61.0-SNAPSHOT~a953f33c70

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.056 s) : 0, 1056468
Total [baseline] (11.131 s) : 0, 11130887
Agent [candidate] (1.065 s) : 0, 1064650
Total [candidate] (11.083 s) : 0, 11083200
section appsec
Agent [baseline] (1.255 s) : 0, 1254982
Total [baseline] (11.194 s) : 0, 11193627
Agent [candidate] (1.259 s) : 0, 1258865
Total [candidate] (11.231 s) : 0, 11231163
section iast
Agent [baseline] (1.239 s) : 0, 1239033
Total [baseline] (11.333 s) : 0, 11332757
Agent [candidate] (1.239 s) : 0, 1239337
Total [candidate] (11.336 s) : 0, 11336233
section profiling
Agent [baseline] (1.193 s) : 0, 1192814
Total [baseline] (11.116 s) : 0, 11116312
Agent [candidate] (1.19 s) : 0, 1190387
Total [candidate] (11.041 s) : 0, 11041461
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.056 s -
Agent appsec 1.255 s 198.514 ms (18.8%)
Agent iast 1.239 s 182.565 ms (17.3%)
Agent profiling 1.193 s 136.346 ms (12.9%)
Total tracing 11.131 s -
Total appsec 11.194 s 62.74 ms (0.6%)
Total iast 11.333 s 201.87 ms (1.8%)
Total profiling 11.116 s -14.575 ms (-0.1%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.065 s -
Agent appsec 1.259 s 194.214 ms (18.2%)
Agent iast 1.239 s 174.687 ms (16.4%)
Agent profiling 1.19 s 125.736 ms (11.8%)
Total tracing 11.083 s -
Total appsec 11.231 s 147.963 ms (1.3%)
Total iast 11.336 s 253.033 ms (2.3%)
Total profiling 11.041 s -41.739 ms (-0.4%)
gantt
    title petclinic - break down per module: candidate=1.61.0-SNAPSHOT~bcc0957a74, baseline=1.61.0-SNAPSHOT~a953f33c70

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.19 ms) : 0, 1190
crashtracking [candidate] (1.203 ms) : 0, 1203
BytebuddyAgent [baseline] (628.481 ms) : 0, 628481
BytebuddyAgent [candidate] (633.418 ms) : 0, 633418
AgentMeter [baseline] (29.134 ms) : 0, 29134
AgentMeter [candidate] (29.318 ms) : 0, 29318
GlobalTracer [baseline] (256.993 ms) : 0, 256993
GlobalTracer [candidate] (258.85 ms) : 0, 258850
AppSec [baseline] (31.639 ms) : 0, 31639
AppSec [candidate] (31.961 ms) : 0, 31961
Debugger [baseline] (60.165 ms) : 0, 60165
Debugger [candidate] (60.786 ms) : 0, 60786
Remote Config [baseline] (606.811 µs) : 0, 607
Remote Config [candidate] (591.091 µs) : 0, 591
Telemetry [baseline] (7.998 ms) : 0, 7998
Telemetry [candidate] (8.827 ms) : 0, 8827
Flare Poller [baseline] (4.233 ms) : 0, 4233
Flare Poller [candidate] (3.547 ms) : 0, 3547
section appsec
crashtracking [baseline] (1.202 ms) : 0, 1202
crashtracking [candidate] (1.219 ms) : 0, 1219
BytebuddyAgent [baseline] (663.341 ms) : 0, 663341
BytebuddyAgent [candidate] (666.203 ms) : 0, 666203
AgentMeter [baseline] (12.15 ms) : 0, 12150
AgentMeter [candidate] (12.118 ms) : 0, 12118
GlobalTracer [baseline] (259.709 ms) : 0, 259709
GlobalTracer [candidate] (260.078 ms) : 0, 260078
IAST [baseline] (24.372 ms) : 0, 24372
IAST [candidate] (24.372 ms) : 0, 24372
AppSec [baseline] (178.177 ms) : 0, 178177
AppSec [candidate] (178.356 ms) : 0, 178356
Debugger [baseline] (66.797 ms) : 0, 66797
Debugger [candidate] (67.006 ms) : 0, 67006
Remote Config [baseline] (626.999 µs) : 0, 627
Remote Config [candidate] (636.107 µs) : 0, 636
Telemetry [baseline] (8.439 ms) : 0, 8439
Telemetry [candidate] (8.721 ms) : 0, 8721
Flare Poller [baseline] (3.643 ms) : 0, 3643
Flare Poller [candidate] (3.673 ms) : 0, 3673
section iast
crashtracking [baseline] (1.199 ms) : 0, 1199
crashtracking [candidate] (1.196 ms) : 0, 1196
BytebuddyAgent [baseline] (804.686 ms) : 0, 804686
BytebuddyAgent [candidate] (806.171 ms) : 0, 806171
AgentMeter [baseline] (11.614 ms) : 0, 11614
AgentMeter [candidate] (11.496 ms) : 0, 11496
GlobalTracer [baseline] (249.25 ms) : 0, 249250
GlobalTracer [candidate] (248.94 ms) : 0, 248940
IAST [baseline] (25.502 ms) : 0, 25502
IAST [candidate] (25.487 ms) : 0, 25487
AppSec [baseline] (26.829 ms) : 0, 26829
AppSec [candidate] (26.728 ms) : 0, 26728
Debugger [baseline] (70.021 ms) : 0, 70021
Debugger [candidate] (70.061 ms) : 0, 70061
Remote Config [baseline] (527.66 µs) : 0, 528
Remote Config [candidate] (524.188 µs) : 0, 524
Telemetry [baseline] (9.738 ms) : 0, 9738
Telemetry [candidate] (9.125 ms) : 0, 9125
Flare Poller [baseline] (3.497 ms) : 0, 3497
Flare Poller [candidate] (3.353 ms) : 0, 3353
section profiling
crashtracking [baseline] (1.186 ms) : 0, 1186
crashtracking [candidate] (1.174 ms) : 0, 1174
BytebuddyAgent [baseline] (688.848 ms) : 0, 688848
BytebuddyAgent [candidate] (688.963 ms) : 0, 688963
AgentMeter [baseline] (8.666 ms) : 0, 8666
AgentMeter [candidate] (8.64 ms) : 0, 8640
GlobalTracer [baseline] (216.798 ms) : 0, 216798
GlobalTracer [candidate] (216.59 ms) : 0, 216590
AppSec [baseline] (32.565 ms) : 0, 32565
AppSec [candidate] (32.422 ms) : 0, 32422
Debugger [baseline] (65.501 ms) : 0, 65501
Debugger [candidate] (65.992 ms) : 0, 65992
Remote Config [baseline] (572.529 µs) : 0, 573
Remote Config [candidate] (555.434 µs) : 0, 555
Telemetry [baseline] (8.584 ms) : 0, 8584
Telemetry [candidate] (7.694 ms) : 0, 7694
Flare Poller [baseline] (3.578 ms) : 0, 3578
Flare Poller [candidate] (3.464 ms) : 0, 3464
ProfilingAgent [baseline] (95.16 ms) : 0, 95160
ProfilingAgent [candidate] (93.747 ms) : 0, 93747
Profiling [baseline] (95.736 ms) : 0, 95736
Profiling [candidate] (94.302 ms) : 0, 94302
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.61.0-SNAPSHOT~bcc0957a74, baseline=1.61.0-SNAPSHOT~a953f33c70

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.061 s) : 0, 1060558
Total [baseline] (8.869 s) : 0, 8869449
Agent [candidate] (1.06 s) : 0, 1059646
Total [candidate] (8.833 s) : 0, 8832892
section iast
Agent [baseline] (1.229 s) : 0, 1228933
Total [baseline] (9.581 s) : 0, 9580810
Agent [candidate] (1.237 s) : 0, 1236963
Total [candidate] (9.555 s) : 0, 9555218
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.061 s -
Agent iast 1.229 s 168.375 ms (15.9%)
Total tracing 8.869 s -
Total iast 9.581 s 711.361 ms (8.0%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.06 s -
Agent iast 1.237 s 177.317 ms (16.7%)
Total tracing 8.833 s -
Total iast 9.555 s 722.327 ms (8.2%)
gantt
    title insecure-bank - break down per module: candidate=1.61.0-SNAPSHOT~bcc0957a74, baseline=1.61.0-SNAPSHOT~a953f33c70

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.203 ms) : 0, 1203
crashtracking [candidate] (1.21 ms) : 0, 1210
BytebuddyAgent [baseline] (630.533 ms) : 0, 630533
BytebuddyAgent [candidate] (632.007 ms) : 0, 632007
AgentMeter [baseline] (29.279 ms) : 0, 29279
AgentMeter [candidate] (29.065 ms) : 0, 29065
GlobalTracer [baseline] (257.777 ms) : 0, 257777
GlobalTracer [candidate] (257.116 ms) : 0, 257116
AppSec [baseline] (31.774 ms) : 0, 31774
AppSec [candidate] (31.637 ms) : 0, 31637
Debugger [baseline] (59.61 ms) : 0, 59610
Debugger [candidate] (59.655 ms) : 0, 59655
Remote Config [baseline] (601.083 µs) : 0, 601
Remote Config [candidate] (581.823 µs) : 0, 582
Telemetry [baseline] (7.943 ms) : 0, 7943
Telemetry [candidate] (7.995 ms) : 0, 7995
Flare Poller [baseline] (5.724 ms) : 0, 5724
Flare Poller [candidate] (4.253 ms) : 0, 4253
section iast
crashtracking [baseline] (1.194 ms) : 0, 1194
crashtracking [candidate] (1.201 ms) : 0, 1201
BytebuddyAgent [baseline] (797.944 ms) : 0, 797944
BytebuddyAgent [candidate] (803.663 ms) : 0, 803663
AgentMeter [baseline] (11.328 ms) : 0, 11328
AgentMeter [candidate] (11.586 ms) : 0, 11586
GlobalTracer [baseline] (247.522 ms) : 0, 247522
GlobalTracer [candidate] (248.891 ms) : 0, 248891
AppSec [baseline] (26.476 ms) : 0, 26476
AppSec [candidate] (26.732 ms) : 0, 26732
Debugger [baseline] (69.418 ms) : 0, 69418
Debugger [candidate] (68.269 ms) : 0, 68269
Remote Config [baseline] (524.505 µs) : 0, 525
Remote Config [candidate] (518.334 µs) : 0, 518
Telemetry [baseline] (9.641 ms) : 0, 9641
Telemetry [candidate] (10.597 ms) : 0, 10597
Flare Poller [baseline] (3.477 ms) : 0, 3477
Flare Poller [candidate] (3.759 ms) : 0, 3759
IAST [baseline] (25.311 ms) : 0, 25311
IAST [candidate] (25.523 ms) : 0, 25523
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master brian.marks/add-ksr-tag
git_commit_date 1773845838 1774020776
git_commit_sha a953f33 bcc0957
release_version 1.61.0-SNAPSHOT~a953f33c70 1.61.0-SNAPSHOT~bcc0957a74
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1774023347 1774023347
ci_job_id 1526095928 1526095928
ci_pipeline_id 103752945 103752945
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-zdbr0ena 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-zdbr0ena 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

Found 0 performance improvements and 4 performance regressions! Performance is the same for 17 metrics, 15 unstable metrics.

scenario Δ mean agg_http_req_duration_p50 Δ mean agg_http_req_duration_p95 Δ mean throughput candidate mean agg_http_req_duration_p50 candidate mean agg_http_req_duration_p95 candidate mean throughput baseline mean agg_http_req_duration_p50 baseline mean agg_http_req_duration_p95 baseline mean throughput
scenario:load:insecure-bank:iast_GLOBAL:high_load worse
[+97.402µs; +229.424µs] or [+3.605%; +8.491%]
worse
[+269.198µs; +648.088µs] or [+3.515%; +8.462%]
unstable
[-197.789op/s; +59.789op/s] or [-14.771%; +4.465%]
2.865ms 8.117ms 1270.031op/s 2.702ms 7.659ms 1339.031op/s
scenario:load:petclinic:appsec:high_load worse
[+0.740ms; +1.678ms] or [+4.043%; +9.170%]
worse
[+0.783ms; +2.900ms] or [+2.611%; +9.675%]
unstable
[-41.374op/s; +14.186op/s] or [-16.597%; +5.691%]
19.510ms 31.817ms 235.688op/s 18.301ms 29.975ms 249.281op/s
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~bcc0957a74, baseline=1.61.0-SNAPSHOT~a953f33c70
    dateFormat X
    axisFormat %s
section baseline
no_agent (19.134 ms) : 18939, 19330
.   : milestone, 19134,
appsec (18.724 ms) : 18534, 18914
.   : milestone, 18724,
code_origins (17.549 ms) : 17376, 17722
.   : milestone, 17549,
iast (18.004 ms) : 17823, 18185
.   : milestone, 18004,
profiling (18.523 ms) : 18341, 18706
.   : milestone, 18523,
tracing (17.801 ms) : 17621, 17982
.   : milestone, 17801,
section candidate
no_agent (18.279 ms) : 18090, 18468
.   : milestone, 18279,
appsec (19.806 ms) : 19597, 20016
.   : milestone, 19806,
code_origins (17.529 ms) : 17355, 17703
.   : milestone, 17529,
iast (17.642 ms) : 17469, 17815
.   : milestone, 17642,
profiling (18.444 ms) : 18258, 18630
.   : milestone, 18444,
tracing (17.724 ms) : 17547, 17900
.   : milestone, 17724,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 19.134 ms [18.939 ms, 19.33 ms] -
appsec 18.724 ms [18.534 ms, 18.914 ms] -410.354 µs (-2.1%)
code_origins 17.549 ms [17.376 ms, 17.722 ms] -1.585 ms (-8.3%)
iast 18.004 ms [17.823 ms, 18.185 ms] -1.13 ms (-5.9%)
profiling 18.523 ms [18.341 ms, 18.706 ms] -611.238 µs (-3.2%)
tracing 17.801 ms [17.621 ms, 17.982 ms] -1.333 ms (-7.0%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 18.279 ms [18.09 ms, 18.468 ms] -
appsec 19.806 ms [19.597 ms, 20.016 ms] 1.527 ms (8.4%)
code_origins 17.529 ms [17.355 ms, 17.703 ms] -750.111 µs (-4.1%)
iast 17.642 ms [17.469 ms, 17.815 ms] -636.948 µs (-3.5%)
profiling 18.444 ms [18.258 ms, 18.63 ms] 165.255 µs (0.9%)
tracing 17.724 ms [17.547 ms, 17.9 ms] -555.561 µs (-3.0%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~bcc0957a74, baseline=1.61.0-SNAPSHOT~a953f33c70
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.189 ms) : 1177, 1201
.   : milestone, 1189,
iast (3.235 ms) : 3189, 3280
.   : milestone, 3235,
iast_FULL (5.785 ms) : 5727, 5842
.   : milestone, 5785,
iast_GLOBAL (3.421 ms) : 3374, 3468
.   : milestone, 3421,
profiling (2.202 ms) : 2183, 2222
.   : milestone, 2202,
tracing (1.805 ms) : 1790, 1820
.   : milestone, 1805,
section candidate
no_agent (1.183 ms) : 1172, 1195
.   : milestone, 1183,
iast (3.215 ms) : 3173, 3257
.   : milestone, 3215,
iast_FULL (5.778 ms) : 5721, 5835
.   : milestone, 5778,
iast_GLOBAL (3.611 ms) : 3563, 3658
.   : milestone, 3611,
profiling (2.178 ms) : 2157, 2198
.   : milestone, 2178,
tracing (1.781 ms) : 1767, 1796
.   : milestone, 1781,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.189 ms [1.177 ms, 1.201 ms] -
iast 3.235 ms [3.189 ms, 3.28 ms] 2.046 ms (172.1%)
iast_FULL 5.785 ms [5.727 ms, 5.842 ms] 4.596 ms (386.6%)
iast_GLOBAL 3.421 ms [3.374 ms, 3.468 ms] 2.232 ms (187.8%)
profiling 2.202 ms [2.183 ms, 2.222 ms] 1.014 ms (85.3%)
tracing 1.805 ms [1.79 ms, 1.82 ms] 616.288 µs (51.8%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.183 ms [1.172 ms, 1.195 ms] -
iast 3.215 ms [3.173 ms, 3.257 ms] 2.032 ms (171.7%)
iast_FULL 5.778 ms [5.721 ms, 5.835 ms] 4.595 ms (388.3%)
iast_GLOBAL 3.611 ms [3.563 ms, 3.658 ms] 2.427 ms (205.1%)
profiling 2.178 ms [2.157 ms, 2.198 ms] 994.358 µs (84.0%)
tracing 1.781 ms [1.767 ms, 1.796 ms] 598.02 µs (50.5%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master brian.marks/add-ksr-tag
git_commit_date 1773845838 1774020776
git_commit_sha a953f33 bcc0957
release_version 1.61.0-SNAPSHOT~a953f33c70 1.61.0-SNAPSHOT~bcc0957a74
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1774023095 1774023095
ci_job_id 1526095931 1526095931
ci_pipeline_id 103752945 103752945
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-vzkp24nv 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-vzkp24nv 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics.

Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~bcc0957a74, baseline=1.61.0-SNAPSHOT~a953f33c70
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.595 s) : 15595000, 15595000
.   : milestone, 15595000,
appsec (14.758 s) : 14758000, 14758000
.   : milestone, 14758000,
iast (18.707 s) : 18707000, 18707000
.   : milestone, 18707000,
iast_GLOBAL (17.712 s) : 17712000, 17712000
.   : milestone, 17712000,
profiling (15.483 s) : 15483000, 15483000
.   : milestone, 15483000,
tracing (14.931 s) : 14931000, 14931000
.   : milestone, 14931000,
section candidate
no_agent (15.457 s) : 15457000, 15457000
.   : milestone, 15457000,
appsec (14.621 s) : 14621000, 14621000
.   : milestone, 14621000,
iast (18.365 s) : 18365000, 18365000
.   : milestone, 18365000,
iast_GLOBAL (17.989 s) : 17989000, 17989000
.   : milestone, 17989000,
profiling (15.343 s) : 15343000, 15343000
.   : milestone, 15343000,
tracing (14.776 s) : 14776000, 14776000
.   : milestone, 14776000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.595 s [15.595 s, 15.595 s] -
appsec 14.758 s [14.758 s, 14.758 s] -837.0 ms (-5.4%)
iast 18.707 s [18.707 s, 18.707 s] 3.112 s (20.0%)
iast_GLOBAL 17.712 s [17.712 s, 17.712 s] 2.117 s (13.6%)
profiling 15.483 s [15.483 s, 15.483 s] -112.0 ms (-0.7%)
tracing 14.931 s [14.931 s, 14.931 s] -664.0 ms (-4.3%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.457 s [15.457 s, 15.457 s] -
appsec 14.621 s [14.621 s, 14.621 s] -836.0 ms (-5.4%)
iast 18.365 s [18.365 s, 18.365 s] 2.908 s (18.8%)
iast_GLOBAL 17.989 s [17.989 s, 17.989 s] 2.532 s (16.4%)
profiling 15.343 s [15.343 s, 15.343 s] -114.0 ms (-0.7%)
tracing 14.776 s [14.776 s, 14.776 s] -681.0 ms (-4.4%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~bcc0957a74, baseline=1.61.0-SNAPSHOT~a953f33c70
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.479 ms) : 1468, 1491
.   : milestone, 1479,
appsec (2.521 ms) : 2466, 2576
.   : milestone, 2521,
iast (2.261 ms) : 2191, 2331
.   : milestone, 2261,
iast_GLOBAL (2.312 ms) : 2242, 2382
.   : milestone, 2312,
profiling (2.121 ms) : 2064, 2179
.   : milestone, 2121,
tracing (2.074 ms) : 2020, 2128
.   : milestone, 2074,
section candidate
no_agent (1.479 ms) : 1468, 1491
.   : milestone, 1479,
appsec (3.762 ms) : 3546, 3979
.   : milestone, 3762,
iast (2.274 ms) : 2204, 2343
.   : milestone, 2274,
iast_GLOBAL (2.317 ms) : 2247, 2386
.   : milestone, 2317,
profiling (2.094 ms) : 2039, 2150
.   : milestone, 2094,
tracing (2.072 ms) : 2019, 2126
.   : milestone, 2072,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.479 ms [1.468 ms, 1.491 ms] -
appsec 2.521 ms [2.466 ms, 2.576 ms] 1.042 ms (70.4%)
iast 2.261 ms [2.191 ms, 2.331 ms] 781.905 µs (52.9%)
iast_GLOBAL 2.312 ms [2.242 ms, 2.382 ms] 833.19 µs (56.3%)
profiling 2.121 ms [2.064 ms, 2.179 ms] 642.305 µs (43.4%)
tracing 2.074 ms [2.02 ms, 2.128 ms] 594.985 µs (40.2%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.479 ms [1.468 ms, 1.491 ms] -
appsec 3.762 ms [3.546 ms, 3.979 ms] 2.283 ms (154.3%)
iast 2.274 ms [2.204 ms, 2.343 ms] 794.592 µs (53.7%)
iast_GLOBAL 2.317 ms [2.247 ms, 2.386 ms] 837.337 µs (56.6%)
profiling 2.094 ms [2.039 ms, 2.15 ms] 615.002 µs (41.6%)
tracing 2.072 ms [2.019 ms, 2.126 ms] 592.919 µs (40.1%)

@bm1549 bm1549 marked this pull request as ready for review March 17, 2026 01:23
@bm1549 bm1549 requested review from a team as code owners March 17, 2026 01:23
@bm1549 bm1549 requested review from amarziali and mtoffl01 and removed request for a team March 17, 2026 01:23
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 17, 2026

⚠️ New Groovy Test Files Added

The following files add Groovy tests to modules that are candidates for migration to Java / JUnit 5:

  • dd-trace-core/src/test/groovy/datadog/trace/core/KnuthSamplingRateTest.groovy (module: dd-trace-core)

Consider writing these tests in Java / JUnit 5 instead to help with the ongoing migration effort.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 17, 2026

Hi! 👋 Thanks for your pull request! 🎉

To help us review it, please make sure to:

  • Add at least one type, and one component or instrumentation label to the pull request

If you need help, please check our contributing guidelines.

@bm1549 bm1549 added comp: core Tracer core and removed comp: core Tracer core labels Mar 17, 2026
bm1549 added a commit to DataDog/dd-trace-rs that referenced this pull request Mar 19, 2026
# What does this PR do?

Adds `_dd.p.ksr` (Knuth Sampling Rate) as a propagated tag set when
agent-based or rule-based sampling decisions are made. The tag is stored
in span `meta` (string type) with up to 6 significant digits and no
trailing zeros.

`format_sampling_rate` now returns `Option<String>` and guards against
invalid inputs (negative, >1.0, NaN, infinity), returning `None` instead
of producing garbage output.

# Motivation

To enable consistent sampling across tracers and backend retention
filters, the backend needs to know the sampling rate applied by the
tracer. Without transmitting the tracer's rate via `_dd.p.ksr`, backend
resampling cannot correctly compute effective rates in multi-stage
sampling scenarios.

See RFC: "Transmit Knuth sampling rate to backend"

# Additional Notes

Key files changed:
- `datadog-opentelemetry/src/core/constants.rs` — Added
`SAMPLING_KNUTH_RATE_TAG_KEY` constant
- `datadog-opentelemetry/src/sampling/datadog_sampler.rs` — Added
`format_sampling_rate()` helper (returns `Option<String>`, defensive
against invalid rates) and set ksr in agent/rule sampling paths
- Updated 2 snapshot JSON files

Related PRs across tracers:
- Java: DataDog/dd-trace-java#10802
- .NET: DataDog/dd-trace-dotnet#8287
- Ruby: DataDog/dd-trace-rb#5436
- Node.js: DataDog/dd-trace-js#7741
- PHP: DataDog/dd-trace-php#3701
- C++: DataDog/dd-trace-cpp#288
- System tests: DataDog/system-tests#6466

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@bm1549 bm1549 requested review from amarziali, dougqh and mcculls March 19, 2026 15:14
…r as primitive double

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@dougqh dougqh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, I think we need to replace the String.format call before this can be merged.
As is, this change increases the memory consumption in a span creation stress test by 2x.

In my local test, 16 threads x 10_000_000 traces x 2 spans, current head allocates 241 GiB. After this change, the same test is allocating 584 GiB. That corresponds to a 15 sec increase in execution time from ~65 secs to ~80 secs. Presumably mostly from GC, but I haven't verified that yet.

bm1549 added a commit to DataDog/dd-trace-go that referenced this pull request Mar 19, 2026
### What does this PR do?

Fixes `_dd.p.ksr` (Knuth Sampling Rate) to only be set on spans when the
agent has provided sampling rates via `readRatesJSON()`. Previously, ksr
was unconditionally set in `prioritySampler.apply()`, including when the
rate was the initial client-side default (1.0) before any agent response
arrived.

Also refactors `prioritySampler` to consolidate lock acquisitions:
extracts `getRateLocked()` so `apply()` acquires `ps.mu.RLock` only once
to read both the rate and `agentRatesLoaded`.

### Motivation

Cross-language consistency: Python, Java, PHP, and other tracers only
set ksr when actual agent rates or sampling rules are applied, not for
the default fallback. This aligns Go with that behavior.

See RFC: "Transmit Knuth sampling rate to backend"

### Additional Notes

- Added `agentRatesLoaded` bool field to `prioritySampler`, set to
`true` in `readRatesJSON()`
- `apply()` now gates ksr behind `agentRatesLoaded` check
- Extracted `getRateLocked()` to avoid double lock acquisition in
`apply()`
- Rule-based sampling path (`applyTraceRuleSampling` in span.go)
unchanged — correctly always sets ksr
- Tests added: `ksr-not-set-without-agent-rates` and
`ksr-set-after-agent-rates-received`

Related PRs across tracers:
- Java: DataDog/dd-trace-java#10802
- .NET: DataDog/dd-trace-dotnet#8287
- Ruby: DataDog/dd-trace-rb#5436
- Node.js: DataDog/dd-trace-js#7741
- PHP: DataDog/dd-trace-php#3701
- Rust: DataDog/dd-trace-rs#180
- C++: DataDog/dd-trace-cpp#288
- System tests: DataDog/system-tests#6466

### Reviewer's Checklist

- [x] Changed code has unit tests for its functionality at or near 100%
coverage.
- [x] [System-Tests](https://github.com/DataDog/system-tests/) covering
this feature have been added and enabled with the va.b.c-dev version
tag.
- [ ] There is a benchmark for any new code, or changes to existing
code.
- [x] If this interacts with the agent in a new way, a system test has
been added.
- [x] New code is free of linting errors. You can check this by running
`make lint` locally.
- [x] New code doesn't break existing tests. You can check this by
running `make test` locally.
- [ ] Add an appropriate team label so this PR gets put in the right
place for the release notes.
- [ ] All generated files are up to date. You can check this by running
`make generate` locally.
- [ ] Non-trivial go.mod changes, e.g. adding new modules, are reviewed
by @DataDog/dd-trace-go-guild. Make sure all nested modules are up to
date by running `make fix-modules` locally.

Unsure? Have a question? Request a review!

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

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Dario Castañé <dario.castane@datadoghq.com>
Co-authored-by: Mikayla Toffler <46911781+mtoffl01@users.noreply.github.com>
bm1549 and others added 2 commits March 19, 2026 17:03
…ay arithmetic

Replace String.format(Locale.ROOT, "%.6g", rate) with manual char-array
formatting that avoids Formatter/stream/boxing allocations. Benchmarks
show ~30x improvement (320ns -> 11ns).

Additionally, cache the TagValue in updateKnuthSamplingRate() so that
getKnuthSamplingRateTagValue() is a simple volatile read (~1.2ns) instead
of re-formatting and re-looking up the TagValue on every header injection.

Add JMH benchmark (KnuthSamplingRateFormatBenchmark) comparing all three
approaches and expand test coverage to all magnitude buckets.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Implement scientific notation (rates < 1e-4) with manual char-array
formatting, removing the last String.format dependency. The method
now uses zero Formatter/Locale allocations for all rate values.

Add test coverage for scientific notation: 1e-05, 5e-05, 1.23457e-05,
1e-07, 5.5e-10.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bm1549 bm1549 requested a review from dougqh March 19, 2026 22:37
Two changes:

1. Benchmark (address dougqh feedback):
   - Switch to Throughput mode + @threads(8) to surface GC pressure
   - @State(Scope.Thread): each thread gets its own PTags, models real traces
   - Add updateRateFreshTrace: resets instance cache each iteration to model
     per-trace cost (the actual hot path Doug was concerned about)
   - Update run instructions to include -t 8 -prof gc

2. Static cache for KSR TagValue (Option A):
   - Add static volatile cachedKsrRate + cachedKsrTagValue to PTags
   - On updateKnuthSamplingRate, check static cache before formatting
   - Eliminates char[]+String allocation on the per-trace path in steady state
     (every new PTags starts with NaN; without the cache, each trace root
     re-formats even when the rate is constant)
   - Race is benign: two threads computing the same rate produce equal TagValues
   - gc.alloc.rate.norm: updateRateFreshTrace goes from 80 B/op → ≈ 0 B/op
     structurally (not JIT-dependent)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bm1549 bm1549 requested a review from dougqh March 20, 2026 17:30
Copy link
Copy Markdown
Contributor

@dougqh dougqh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the latest changes, that use hand-rolled / AI-generated serialization code and the addition of a cache, the overhead is now minimal.

From a performance perspective, I think this is good to go. I'll post more detailed numbers later today.

@bm1549 bm1549 added this pull request to the merge queue Mar 20, 2026
@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts Bot commented Mar 20, 2026

/merge

@gh-worker-devflow-routing-ef8351
Copy link
Copy Markdown

gh-worker-devflow-routing-ef8351 Bot commented Mar 20, 2026

View all feedbacks in Devflow UI.

2026-03-20 17:59:18 UTC ℹ️ Start processing command /merge


2026-03-20 17:59:21 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 3h (p90).


2026-03-20 19:03:23 UTC ℹ️ MergeQueue: This merge request was merged

@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 20, 2026
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot merged commit 793a2ad into master Mar 20, 2026
569 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot deleted the brian.marks/add-ksr-tag branch March 20, 2026 19:03
@github-actions github-actions Bot added this to the 1.61.0 milestone Mar 20, 2026
@dougqh
Copy link
Copy Markdown
Contributor

dougqh commented Mar 20, 2026

Following up with overhead numbers, the final change reduced the allocation in my stress test by 23 GiB.
The change still adds 2 GiB of allocation to the stress test, but that only amounts to < 1%. That's about as good as we can expect for now.

Hopefully with later changes to lazily construct PropagationTags, we can reduce this further.

bm1549 added a commit that referenced this pull request Mar 21, 2026
The tibco-testing pipeline has hardcoded expected span meta maps that
break whenever new propagation tags are added (e.g. _dd.p.ksr from
#10802). Remove the trigger to unblock master.

See also: #10906

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bm1549 added a commit to DataDog/dd-trace-dotnet that referenced this pull request Mar 25, 2026
## Summary of changes

Add `_dd.p.ksr` (Knuth Sampling Rate) propagated tag to spans when
sampling is applied via agent rates or trace sampling rules, per the
[Transmit Knuth Sampling Rate to Backend
RFC](https://docs.google.com/document/d/1Po3qtJb6PGheFeKFSUMv2pVY_y-HFAxTzNLuacCbCXY/edit).

## Reason for change

The backend needs to know the exact sampling rate applied by the tracer
to correctly compute effective rates during resampling (e.g., tracer 0.5
× backend 0.5 = effective 0.25). This tag enables that by propagating
the rate via `x-datadog-tags` and W3C `tracestate`.

## Implementation details

- Set `_dd.p.ksr` in `TraceContext.SetSamplingPriority()` for
`AgentRate`, `LocalTraceSamplingRule`, `RemoteAdaptiveSamplingRule`, and
`RemoteUserSamplingRule` mechanisms
- Use `TryAddTag` to preserve the original rate (consistent with
`AppliedSamplingRate ??= rate` semantics)
- Format with `"0.######"` (up to 6 decimal digits, no trailing zeros,
no scientific notation) per RFC spec
- Added `.IsOptional("_dd.p.ksr")` to `SpanTagAssertion.cs` so
integration test tag validators accept the new tag

## Test coverage

- Unit tests in `TraceContextTests_KnuthSamplingRate.cs`:
  - KSR set for agent rate sampling
- KSR set for trace sampling rules (local, remote adaptive, remote user)
- KSR NOT set for manual, AppSec, rate limiter, or single span
mechanisms
  - KSR preserved on subsequent sampling calls (TryAddTag semantics)
- Formatting with up to 6 decimal digits (boundary values including
small rates like 0.00001)
- System tests in [system-tests
#6466](DataDog/system-tests#6466)

## Other details

Related PRs across tracers:
- Java: DataDog/dd-trace-java#10802
- Ruby: DataDog/dd-trace-rb#5436
- Node.js: DataDog/dd-trace-js#7741
- PHP: DataDog/dd-trace-php#3701
- Rust: DataDog/dd-trace-rs#180
- C++: DataDog/dd-trace-cpp#288

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
korniltsev-grafanista added a commit to grafana/pyroscope-dotnet that referenced this pull request Apr 21, 2026
* [Version Bump] 3.41.0 (#8355)

The following files were found to be modified (as expected)

- [x] docs/CHANGELOG.md
- [x] .azure-pipelines/ultimate-pipeline.yml
- [x]
profiler/src/ProfilerEngine/Datadog.Profiler.Native.Linux/CMakeLists.txt
- [x]
profiler/src/ProfilerEngine/Datadog.Profiler.Native.Windows/Resource.rc
- [x]
profiler/src/ProfilerEngine/Datadog.Profiler.Native/dd_profiler_version.h
- [x]
profiler/src/ProfilerEngine/Datadog.Linux.ApiWrapper/CMakeLists.txt
- [x] profiler/src/ProfilerEngine/ProductVersion.props
- [x] shared/src/Datadog.Trace.ClrProfiler.Native/CMakeLists.txt
- [x] shared/src/Datadog.Trace.ClrProfiler.Native/Resource.rc
- [x] shared/src/msi-installer/WindowsInstaller.wixproj
- [x] shared/src/native-src/version.h
- [x] tracer/build/artifacts/dd-dotnet.sh
- [x] tracer/build/_build/Build.cs
- [x]
tracer/samples/AutomaticTraceIdInjection/MicrosoftExtensionsExample/MicrosoftExtensionsExample.csproj
- [x]
tracer/samples/AutomaticTraceIdInjection/Log4NetExample/Log4NetExample.csproj
- [x]
tracer/samples/AutomaticTraceIdInjection/NLog40Example/NLog40Example.csproj
- [x]
tracer/samples/AutomaticTraceIdInjection/NLog45Example/NLog45Example.csproj
- [x]
tracer/samples/AutomaticTraceIdInjection/NLog46Example/NLog46Example.csproj
- [x]
tracer/samples/AutomaticTraceIdInjection/SerilogExample/SerilogExample.csproj
- [x] tracer/samples/ConsoleApp/Alpine3.10.dockerfile
- [x] tracer/samples/ConsoleApp/Alpine3.9.dockerfile
- [x] tracer/samples/ConsoleApp/Debian.dockerfile
- [x] tracer/samples/OpenTelemetry/Debian.dockerfile
- [x] tracer/samples/WindowsContainer/Dockerfile
- [x] tracer/src/Datadog.Trace.ClrProfiler.Managed.Loader/Startup.cs
- [x] tracer/src/Datadog.Tracer.Native/CMakeLists.txt
- [x] tracer/src/Datadog.Tracer.Native/dd_profiler_constants.h
- [x] tracer/src/Datadog.Tracer.Native/Resource.rc
- [x] tracer/src/Directory.Build.props
- [x] tracer/src/Datadog.Trace/TracerConstants.cs

@DataDog/apm-dotnet

Co-authored-by: zacharycmontoya <13769665+zacharycmontoya@users.noreply.github.com>

* [tracing] add support for `DiagnosticSource` (and Quartz) in .NET Framework (#7687)

## Summary of changes
Adds `.NET Framework` support for the `DiagnosticManager` /
`DiagnosticObserver` infrastructure and uses it to enhance Quartz span
metadata on both Framework and non-Framework
targets.
## Reason for change
The `DiagnosticObserver` class was previously gated behind `#if
!NETFRAMEWORK`, limiting tracing integrations that depend on it to
modern .NET only. Quartz is the first
   
## Implementation details
                                                                       
  ### DiagnosticManager — Framework support
On `!NETFRAMEWORK`, the existing path is unchanged:
`DiagnosticListener.AllListeners.Subscribe(new
DiagnosticListenerObserver(this))`.
On `NETFRAMEWORK`, `DiagnosticListener` isn't available at compile time
(it ships as a NuGet package, not part of the BCL). Two problems had to
be solved:
1. **Accessing the static `AllListeners` property** — solved with
reflection to locate the `DiagnosticListener` type and read its static
property at runtime.
2. **Generic invariance** — `AllListeners.Subscribe` expects
`IObserver<DiagnosticListener>` (the real type). A new
`FrameworkDiagnosticListenerObserver` reverse duck type
(`[DuckReverseMethod]` + `.DuckImplement()`) generates a proxy at
runtime that satisfies the exact generic interface, forwarding each
`OnNext` call back to `DiagnosticManager`.
                                                                       
### DiagnosticObserver — duck typed DiagnosticListener
`SubscribeIfMatch` was updated to accept `IDiagnosticListener` (a new
duck type interface) instead of the concrete `DiagnosticListener`,
removing the compile-time dependency on
the type across the whole observer hierarchy.
   
### Quartz
- `QuartzDiagnosticObserver` is registered in `StartDiagnosticManager`
unconditionally (both platforms).
- `QuartzCommon` was enhanced to set the `component: quartz` tag and
activity kind on the pre-`IActivity5` fallback path (< .NET 5), bringing
its span metadata in line with
newer runtimes.
   
### Cleanup
- Consolidated the duplicate `#if !NETFRAMEWORK` / `#else` split of
`StartDiagnosticManager` in `Instrumentation.cs` into a single method
with an inline directive.
- Removed an unnecessary `#if NETFRAMEWORK` block in
`ActivityListener.cs` that duplicated
`CreateDiagnosticSourceListenerInstance` — the IL emit approach works on
Framework
too.
## Test coverage
- New snapshot `QuartzTestsV3NETFRAMEWORK.verified.txt` covering Quartz
on .NET Framework.
- Updated `QuartzTestsV3NETCOREAPP3X.verified.txt` to include the
`component: quartz` tag now set on the pre-`IActivity5` path.
  
## Other details
<!-- Fixes #{issue} -->
<!-- ⚠️ Note:
Where possible, please obtain 2 approvals prior to merging. Unless
CODEOWNERS specifies otherwise, for external teams it is typically best
to have one review from a team member,
and one review from apm-dotnet. Trivial changes do not require 2
reviews.
MergeQueue is NOT enabled in this repository. If you have write access
to the repo, the PR has 1-2 approvals (see above), and all of the
required checks have passed, you can use
the Squash and Merge button to merge the PR. If you don't have write
access, or you need help, reach out in the #apm-dotnet channel in Slack.
-->

---------

Co-authored-by: Lucas Pimentel <lucas.pimentel@datadoghq.com>

* Fix `dd-octo-sts` trust policy for create-draft-release workflow (#8356)

## Summary of changes

Fix the `dd-octo-sts` trust policy that blocked the release

## Reason for change

The `create_normal_draft_release` workflow was failing at the "Get
GitHub Token via dd-octo-sts" step with:

```
subject_pattern "repo:DataDog/dd-trace-dotnet:environment:publish-debug-symbols-env"
did not match "repo:DataDog/dd-trace-dotnet:ref:refs/heads/(master|hotfix/.+)"
```

See failed run:
https://github.com/DataDog/dd-trace-dotnet/actions/runs/23446312090/job/68210958105

## Implementation details

The root cause is that the `_create_draft_release.yml` reusable workflow
specifies `environment: publish-debug-symbols-env` on the job, which is
required to access environment-scoped secrets for publishing debug
symbols. When a GitHub Actions job uses an environment, the OIDC token's
`sub` claim uses the format:

- `repo:{owner}/{repo}:environment:{env}` 
- instead of `repo:{owner}/{repo}:ref:{ref}`.
 
The trust policy's `subject_pattern` was matching against the ref-based
format, so it never matched.

This fix:
- Changes `subject_pattern` to an exact `subject` match on the
environment-based subject (more secure than a pattern)
- Adds `environment: publish-debug-symbols-env` to `claim_pattern` for
defense in depth
- Retains `ref` and `job_workflow_ref` claim patterns to continue
enforcing the branch restriction `(master|hotfix/*)` via claims

Additionally, make sure the AAS trigger job if the `curl` fails (by
adding `-f`)

## Test coverage

I wish... we'll see how it goes next time

## Other details

Need to make a fix on the AAS side too... incoming

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Fix InvalidCastException in DefaultModelBindingContext (#8334)

## Summary of changes

Fix
[`InvalidCastException`](https://app.datadoghq.com/error-tracking?query=service%3Ainstrumentation-telemetry-data%20%40lib_language%3Adotnet%20version%3A3.3%2A&et-issue__tab=investigate&et-side=activity&fromUser=false&issue_states=open&order=total_count&refresh_mode=sliding&source=all&sp=%5B%7B%22p%22%3A%7B%22issueId%22%3A%22404d80aa-3ade-11f0-814f-da7ad0900002%22%7D%2C%22i%22%3A%22error-tracking-issue%22%7D%5D&from_ts=1773333586601&to_ts=1773938386601&live=true)
in `DefaultModelBindingContext_SetResult_Integration.OnMethodEnd` by
changing the `ValueProvider` field in the `DefaultModelBindingContext`
DuckCopy struct from `IList` to `object`, and safe-casting to `IList` at
the usage site.

## Reason for change

Customers using custom `IModelBinder` implementations that set
`bindingContext.ValueProvider` to a non-`CompositeValueProvider` (i.e.,
an `IValueProvider` that does not implement `IList`) trigger an
`InvalidCastException` during DuckCopy:

```
Error : Exception occurred when calling the CallTarget integration continuation.
System.InvalidCastException
   at Datadog.Trace.ClrProfiler.AutoInstrumentation.AspNetCore.DefaultModelBindingContext_SetResult_Integration.OnMethodEnd[TTarget](TTarget instance, Exception exception, CallTargetState& state)
   at Microsoft.AspNetCore.Mvc.ModelBinding.DefaultModelBindingContext.set_Result(ModelBindingResult value)
```

In standard MVC usage, `ValueProvider` is always a
`CompositeValueProvider` (which inherits from
`Collection<IValueProvider>` and implements `IList`), so the DuckCopy
`Castclass` IL instruction succeeds. However, when a custom model binder
assigns a plain `IValueProvider` that does not implement `IList`, the
cast fails. Additionally, `TryDuckCast` does not wrap `CreateInstance`
in a try/catch, so the exception propagates uncaught.

## Implementation details

## Test coverage

## Other details

* Increase endpoint telemetry wait timeout (#8294)

<!-- dd-meta
{"pullId":"806bee5a-6a7b-4844-99f8-37e6f6b3faa2","source":"chat","resourceId":"45756181-5088-42df-acf5-46cd00319c58","workflowId":"7279f062-bde8-4f32-93cc-ab9ed8025441","codeChangeId":"7279f062-bde8-4f32-93cc-ab9ed8025441","sourceType":"action_platform_custom_agent"}
-->
## Summary of changes
- Increased the AppEndpoints telemetry wait timeout in API Security
endpoint collection tests to reduce flakiness on slower CI environments.

## Reason for change
- `WaitForLatestTelemetryAsync` defaults to a 5-second timeout in
`MockTracerAgent`.
- Endpoint telemetry collection can take longer than 5 seconds under CI
load (cold start + endpoint discovery + heartbeat + delivery), causing
intermittent null telemetry and test failures.

## Implementation details
- Updated
`tracer/test/Datadog.Trace.Security.IntegrationTests/ApiSecurity/AspNetCoreEndpoints.cs`:
- Changed the `WaitForLatestTelemetryAsync` call in
`TestEndpointsCollection()` to pass `timeoutInMilliseconds: 30000`.
- This base test method is used by the API Security endpoint collection
test variants (including `AspNetCore5EndpointsApmTracingDisabled`), so
all relevant endpoint collection tests now use the increased timeout.

## Test coverage
- Attempted to run:
- `dotnet test
tracer/test/Datadog.Trace.Security.IntegrationTests/Datadog.Trace.Security.IntegrationTests.csproj
--filter
"FullyQualifiedName~ApiSecurity.AspNetCore5EndpointsApmTracingDisabled.TestEndpointsCollection"`
- Could not execute in this environment because the repository requires
.NET SDK `10.0.100` from `global.json`, but only SDK `8.0.412` is
installed.
- Formatting check attempted via `Format` tool, but `dotnet format`
failed for the same SDK reason.
- Lint tool could not determine a linter for the changed C# file.

## Other details
<!-- Fixes #{issue} -->

---

PR by Bits - [View session in
Datadog](https://app.datadoghq.com/code/45756181-5088-42df-acf5-46cd00319c58)

Comment @datadog to request changes

Co-authored-by: datadog-prod-us1-6[bot] <266788760+datadog-prod-us1-6[bot]@users.noreply.github.com>

* Fix dd_dotnet.ArtifactTests.CreatedumpTests.DisableTelemetry flakiness (#8354)

## Summary of changes

Fixes intermittent `CreatedumpTests` failures on arm64 Linux by relaxing
the createdump output assertion when the .NET runtime's `createdump`
tool fails due to a known ptrace race condition.

## Reason for change

On arm64 Linux, `createdump` intermittently fails with `ptrace(ATTACH,
<tid>) FAILED No such process` — a race condition where threads exit
before createdump can attach to them. When this happens, createdump
aborts without writing `"Writing minidump with heap to file /dev/null"`,
causing the test assertion to fail even though our crash tracking code
correctly invoked createdump.

This is a known .NET runtime limitation tracked in multiple issues:
-
[dotnet/runtime#119700](https://github.com/dotnet/runtime/issues/119700)
-
[dotnet/runtime#112620](https://github.com/dotnet/runtime/issues/112620)
- [dotnet/runtime#77466](https://github.com/dotnet/runtime/issues/77466)

Flaky test identified via [CI Test
Management](https://app.datadoghq.com/ci/test/flaky?sort=-pipelines_failed&sp=%5B%7B%22p%22%3A%7B%22fingerprintFqn%22%3A%22eb3fae1eba7c4b0b%22%7D%2C%22i%22%3A%22test-optimization-flaky-management-history%22%7D%5D&viewMode=flaky).

## Implementation details

- Added `AssertCreatedumpWasInvoked()` helper that, **only on arm64
Linux**, also accepts `"[createdump] Gathering state for process"` as
evidence that createdump was invoked (even if it failed due to the
ptrace race). On all other platforms, the strict assertion is preserved.
- Updated all 4 assertion sites: `Passthrough`, `BashScript`,
`DoNothingIfNotEnabled`, and `DisableTelemetry`.
- Tightened negative assertions (the "should NOT call createdump"
branches) to check for both strings.

## Test coverage

## Other details

The test's purpose is to verify that *our crash tracking code correctly
invokes createdump*, not that createdump itself succeeds. The relaxed
assertion still validates that createdump was started by our code.

* Add smoke tests for Datadog.AzureFunctions NuGet package (#8336)

## Summary of changes

Adds new Windows and Linux smoke tests for the Datadog.AzureFunctions
NuGet package

## Reason for change

We recently had an issue where the Datadog.AzureFunctions package was
broken, but as we don't currently test the package itself, we didn't
catch it. This adds tests to make sure we can actually install the
package that we build, similar to how we test the Datadog.Trace.Bundle
package today.

## Implementation details

This was harder than I had hoped, and required a bit of refactoring to
the Nuke smoke tests that we added in
https://github.com/DataDog/dd-trace-dotnet/pull/8271, as well as
enabling the new smoke tests.

For the refactoring, this PR:
- Updates the "nuget" smoke test dockerfiles to allow providing a
`NUGET_PACKAGE` variable, so we can reuse the dockerfiles for multiple
nuget packages
- Add `IncludeDdDotnetScenario` to the windows nuget scenario - today we
always try the `dd-dotnet` case after the "env vars" case, but there's
no `dd-dotnet` in Datadog.AzureFunctions.
- Ensure we delete the logs from previous runs before starting the
tests, this bit when I was testing locally as I was failing on errors
from _previous_ runs
- Make the specifying of runtime environment variables to pass in
scenario-specific. We bake a lot of env vars into the dockerfiles, but
it means that if you need different env vars for different scenarios
that use the _same_ dockerfile, you can.

In terms of enabling the Azure Functions smoke tests:
- Add two new stages, Windows and Linux, running tests with the
Datadog.AzureFunctions NuGet package. Made them "extended" tests so they
only run on main/hotfix branches, seeing as the package will rarely
change.
- Add a couple of exceptions to warnings caused by missing libdatadog
and profiler. These are always logged today, and can't be avoided
AFAICT. They may be candidates for looking into further, but they're
benign, so this is the easiest approach.
- Update the env vars we pass in:
  - Don't set `LD_PRELOAD` (because the file doesn't exist)
  - Disable ASM and profiling (the native libraries aren't included)
  - "Pretend" to be in AAS, to try to stop using libdatadog config
- Set `AWS_LAMBDA_FUNCTION_NAME` to avoid sending config to the profiler
(we can't pretend to be in Azure functions, because otherwise we disable
the aspnetcore integration which we need😅)
- Set a fake `DD_API_KEY` otherwise we're marked as "unsafe to trace"
and disable tracing
- Add a new "Azure Functions snapshot", seeing as we have a bunch of AAS
tags added now, and are missing the ASM ones etc.

## Test coverage

More now! 🎉 

[I did a test
run](https://dev.azure.com/datadoghq/dd-trace-dotnet/_build/results?buildId=197781&view=results)
in which I restore the previous "broken" NuGet, and it causes the smoke
tests to fail (which is good):

```
 error: NU1102: Unable to find package Datadog.Trace.Annotations with version (>= 3.40.0)

```

I've done multiple runs showing it passes otherwise, but I'll do a final
run before merging to make sure

## Other details

Context:
- #8285 
- #8289

---------

Co-authored-by: Lucas Pimentel <lucas.pimentel@datadoghq.com>

* [Test Package Versions Bump] Updating package versions (#8342)

Updates the package versions for integration tests.

Co-authored-by: andrewlock <18755388+andrewlock@users.noreply.github.com>

* Fix `CA1861` - Avoid constant arrays as arguments (#8332)

## Summary of changes

Enables the `CA1861` analyzer, and fixes all the violations

## Reason for change

The analyzer flags cases where we're creating small arrays and throwing
them away, which is generally not great for perf.

The violations we have are actually very minor, because most of the time
they're "one off" usages. However, given that there are a _bunch_ of
"one off" usages in various places, it seemed like it would make sense
to just define these statically.

Obviously as these are static readonly cases they will add a tiny bump
to long term memory pressure, so I'm not _entirely_ sure that we
shouldn't just be ignoring the violations - open to opinions there 🤔

I mostly went with this approach because the sourcelink parses
potentially run multiple times, and therefore probably _do_ need to
cache the arrays, and that's basically _all_ of the arrays we would need
everywhere so this seemed to make sense 🤷‍♂️

## Implementation details

- Enable CA1861
- Introduce `Datadog.Trace.Util.Separators` type with `static readonly
char[]`
- Use them where we can

## Test coverage

Covered by existing tests

## Other details

https://datadoghq.atlassian.net/browse/LANGPLAT-813

Looked at using `InlineArray` instead but that's only in .NET 8+ and the
APIs we're calling often don't take `Span<char>` anyway

* [Tracing] Add experimental support for exporting traces as OTLP (.NET 6+) (#8211)

## Summary of changes
Adds experimental support for exporting traces using
[OTLP](https://github.com/open-telemetry/opentelemetry-proto/blob/v1.9.0/opentelemetry/proto/trace/v1/trace.proto)
rather than the Datadog MessagePack protocols. This allows the DD SDK to
send traces to an OTel collector rather than a Datadog Trace Agent, with
limited support for non-APM products.

This feature is enabled by setting `OTEL_TRACES_EXPORTER=otlp`.

Note: This feature is currently only supported for .NET 6+, and only the
`http/json` OTLP protocol is supported at this time. Setting any other
protocol value falls back to Datadog encoding with a startup warning.

### Configuration

| Configuration | Details |
|---------------|---------|
| `OTEL_TRACES_EXPORTER=otlp` | Enables the OTLP traces export |
| `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` | See the [OTLP Exporter
Configuration
docs](https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/)
|
| `OTEL_EXPORTER_OTLP_TRACES_HEADERS` | See the [OTLP Exporter
Configuration
docs](https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/)
|
| `OTEL_EXPORTER_OTLP_TRACES_PROTOCOL` | See the [OTLP Exporter
Configuration
docs](https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/)
|
| `OTEL_EXPORTER_OTLP_TRACES_TIMEOUT` | See the [OTLP Exporter
Configuration
docs](https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/)
|


## Reason for change
We are seeing an increasing number of scenarios where users have
applications instrumented with the OTel SDK sending data to OTel
collectors, and they would like to get additional features offered by
the DD SDK without needing to update their OTel collector deployments.
Although there will be follow-up work, this provides the ability for
users to write vendor-neutral API instrumentation *and* emit
vendor-neutral telemetry data so DD SDK users don't have to feel locked
in when setting up Datadog APM.

## Implementation details

### Configuration
All OTLP exporter configuration (Traces and Metrics) is read in
`ExporterSettings` and exposed as properties (`OtlpTracesEndpoint`,
`OtlpTracesProtocol`, `OtlpTracesHeaders`, `OtlpTracesTimeoutMs`, and
the corresponding `OtlpMetrics*` properties). The `TracesEncoding`
property (of type `Datadog.Trace.Agent.TracesEncoding`) determines the
serialization format: `DatadogV0_4`, `OtlpProtobuf`, or `OtlpJson`. Only
`OtlpJson` is currently functional; `OtlpProtobuf` is defined but not
yet implemented.

OTLP endpoint resolution is handled separately from Datadog trace
transport settings to avoid comingling the two URL calculation paths.
The OTLP endpoint logic considers `DD_AGENT_HOST` before falling back to
the OTLP default host of `localhost`.

### Serialization
The `SpanBuffer` class was refactored to use a pluggable
`ISpanBufferSerializer` interface (methods: `HeaderSize`,
`SerializeSpans`, `WriteHeader`, `FinishBody`). Two implementations
exist:
- **`SpanBufferMessagePackSerializer`**: The existing Datadog
MessagePack serialization, extracted into its own class.
- **`OtlpTracesJsonSerializer`**: Serializes `TraceChunkModel` and
`Span` objects into the OTLP `ExportTraceServiceRequest` JSON structure.
Key behaviors:
- Resource attributes (service.name, service.version,
deployment.environment.name, telemetry SDK info, git metadata, runtime
ID) are emitted via `OtlpMapper.EmitResourceAttributesFromTraceChunk()`
  - Span attributes are capped at 128 per span
- Span events (128 limit), span links (128 limit), span status, and span
kind are all mapped
- Field names use lowerCamelCase and enums use integer values per the
OTLP http/json encoding spec

### Datadog-to-OTLP Mapping
The `OtlpMapper` static class (under `OpenTelemetry/`) handles the
translation between Datadog span semantics and OTLP attributes. It
determines which tags are resource-level vs. span-level, manages
attribute limits, and processes string/double/byte[] tag types via an
inner `TagWriter` struct.

### Sampling & Stats Aggregation
When OTLP export is enabled:
- **Sampling**: Only the `PrioritySampler` is used in
`ShouldKeepTrace()`, aligning with the OpenTelemetry SDK behavior of
exporting based solely on the sampling decision.
- **Default sampling rate**: A global sampling rate of 1.0 is set by
default (can be overridden by user configuration), and the
`AgentSamplingRule` is omitted since there is no Datadog Agent to
communicate sampling rules.
- **`StatsAggregationKey`**: Extended with `IsError` and `IsTopLevel`
fields for OTLP mode, allowing distinct histogram timeseries. The
Datadog mode constructor continues to set these to false for backwards
compatibility.

### Export
- **`ApiOtlp`** (NET6_0_OR_GREATER only): Implements `IApi` for OTLP
endpoints with retry logic (up to 5 attempts with exponential backoff
starting at 100ms).
- **`ManagedApiOtlp`**: Thread-safe wrapper that enables atomic swapping
of `ApiOtlp` instances (for configuration refresh).
- **Traces**: Serialized by `OtlpTracesJsonSerializer` into
`SpanBuffer`, then sent by `ApiOtlp.SendTracesAsync()` to the OTLP
traces endpoint with custom headers.
- **Metrics (trace stats)**: `SendStatsAsync` is defined but currently
returns success immediately — DDSketch-to-OTLP histogram conversion was
removed from this PR and will be introduced in a follow-up PR alongside
new unit tests.

### Wiring
In `TracerManagerFactory.GetAgentWriter()`, when `TracesEncoding` is
`OtlpProtobuf` or `OtlpJson`, the method creates a `ManagedApiOtlp` and
a `StatsAggregator` with `isOtlp: true`, then passes both to
`AgentWriter`.

## Test coverage
- **Integration test**: `OpenTelemetrySdkTests.SubmitsOtlpTraces` — A
parameterized test exercising different package versions, protocols, and
configurations. Sends OTLP traces to the dd-apm-test-agent, retrieves
payloads, validates trace/span ID formats (32-char/16-char hex), checks
resource attribute consistency across requests, normalizes dynamic
values, and performs snapshot testing.
- **Unit tests**: Tests for OTLP-specific behaviors including: stats
aggregator enablement when exporting OTLP, exporting only sampled spans,
and omission of the AgentSamplingRule.
- **Docker**: The docker-compose configuration was updated to wait for
test-agent ports 4317 (gRPC) and 4318 (HTTP) for OTLP traffic.

## Follow-up work
- Export trace metrics (APM stats) via OTLP metrics with
DDSketch-to-OTLP histogram conversion (removed from this PR —
`SendStatsAsync` currently no-ops)
- Assert against trace metrics in the `SubmitsOtlpTraces` integration
test
- Stop reading OTLP metrics settings in `TracerSettings` now that they
are being read in `ExporterSettings`
- Implement `http/protobuf` OTLP protocol support (enum value exists but
not yet functional)

* chore: disable automated dependency updater config [incident-51602] (#8364)

As part of #incident-51602, we are temporarily disabling all automated
dependency updaters to reduce exposure to potential zero-day
vulnerabilities in recent releases.

This PR disables the Dependabot/Renovate configuration not managed by
ADMS by commenting out (YAML) or renaming (JSON) the config file. Please
do not re-enable until further notice.

---------

Co-authored-by: Steven Bouwkamp <steven.bouwkamp@datadoghq.com>

* Use `SpanCharSplitter` for parsing source link URLs (#8349)

## Summary of changes

- Add unit tests for `SourceLinkUrlParser` implementations
- Refactor implementations to reduce allocations (by using
`SpanCharSplitter` instead of `String.Split()`

## Reason for change

@lucaspimentel flagged this as an option in
https://github.com/DataDog/dd-trace-dotnet/pull/8332, as it will reduce
allocations. As this is something we do for every app, it makes sense to
optimize.

## Implementation details

- Had 🤖 write some unit tests for the current behaviour
- Had 🤖 replace existing `Split` usages with `SpanCharSplitter`
- Review and tweak

There's still some allocations we could _potentially_ remove, by doing
some dangerous stuff (like we do in `UriHelpers`, to avoid hitting
`AbsolutePath` etc) but I don't know that the payoff is worth it here.
Fewer allocations is better, but it's not worth going overboard IMO.

## Test coverage

- The unit tests pass before and after the changes
- Benchmarked just one of the implementations before and after, but you
get the idea I think


| Method | Runtime | Mean | Allocated |
| ------------------------------ | ------------------ | ---------: |
--------: |
| TryParseSourceLinkUrl_Original | .NET 10.0 | 2,929.4 ns | 2552 B |
| TryParseSourceLinkUrl_Updated | .NET 10.0 | 400.4 ns | 240 B |
| TryParseSourceLinkUrl_Original | .NET 6.0 | 2,540.5 ns | 2584 B |
| TryParseSourceLinkUrl_Updated | .NET 6.0 | 376.1 ns | 240 B |
| TryParseSourceLinkUrl_Original | .NET Core 3.1 | 3,550.8 ns | 2672 B |
| TryParseSourceLinkUrl_Updated | .NET Core 3.1 | 450.3 ns | 456 B |
| TryParseSourceLinkUrl_Original | .NET Framework 4.8 | 3,875.2 ns |
4036 B |
| TryParseSourceLinkUrl_Updated | .NET Framework 4.8 | 708.1 ns | 578 B
|

<details><summary>Benchmark code</summary>
<p>

```csharp
[MemoryDiagnoser, GroupBenchmarksBy(BenchmarkLogicalGroupRule.ByCategory), CategoriesColumn]
public class UriHelperBenchmarks
{
    private string _sha;
    private string _repoUrl;
    private Uri _uri;
    private AzureDevOpsSourceLinkUrlParser _parser;
    private AzureDevOpsSourceLinkUrlParserOriginal _parser2;

    [GlobalSetup]
    public void GlobalSetup()
    {
        _parser = new AzureDevOpsSourceLinkUrlParser();
        _parser2 = new AzureDevOpsSourceLinkUrlParserOriginal();
        _uri = new Uri("https://dev.azure.com/org/proj/_apis/git/repositories/example.shopping.api/items?api-version=1.0&versionType=commit&version=0e4d29442102e6cef1c271025d513c8b2187bcd6&path=/*");
    }

    [GlobalCleanup]
    public void GlobalCleanup()
    {
        _sha = null;
        _repoUrl = null;
    }

    [Benchmark(Baseline = true)]
    public bool TryParseSourceLinkUrl_Original()
    {
        return _parser2.TryParseSourceLinkUrl(_uri, out _sha, out _repoUrl);
    }

    [Benchmark]
    public bool TryParseSourceLinkUrl_Updated()
    {
        return _parser.TryParseSourceLinkUrl(_uri, out _sha, out _repoUrl);
    }
}
```

</p>
</details> 

## Other details

Stacked on https://github.com/DataDog/dd-trace-dotnet/pull/8332 for
simplicity

* Add _dd.p.ksr propagated tag for Knuth sampling rate (#8287)

## Summary of changes

Add `_dd.p.ksr` (Knuth Sampling Rate) propagated tag to spans when
sampling is applied via agent rates or trace sampling rules, per the
[Transmit Knuth Sampling Rate to Backend
RFC](https://docs.google.com/document/d/1Po3qtJb6PGheFeKFSUMv2pVY_y-HFAxTzNLuacCbCXY/edit).

## Reason for change

The backend needs to know the exact sampling rate applied by the tracer
to correctly compute effective rates during resampling (e.g., tracer 0.5
× backend 0.5 = effective 0.25). This tag enables that by propagating
the rate via `x-datadog-tags` and W3C `tracestate`.

## Implementation details

- Set `_dd.p.ksr` in `TraceContext.SetSamplingPriority()` for
`AgentRate`, `LocalTraceSamplingRule`, `RemoteAdaptiveSamplingRule`, and
`RemoteUserSamplingRule` mechanisms
- Use `TryAddTag` to preserve the original rate (consistent with
`AppliedSamplingRate ??= rate` semantics)
- Format with `"0.######"` (up to 6 decimal digits, no trailing zeros,
no scientific notation) per RFC spec
- Added `.IsOptional("_dd.p.ksr")` to `SpanTagAssertion.cs` so
integration test tag validators accept the new tag

## Test coverage

- Unit tests in `TraceContextTests_KnuthSamplingRate.cs`:
  - KSR set for agent rate sampling
- KSR set for trace sampling rules (local, remote adaptive, remote user)
- KSR NOT set for manual, AppSec, rate limiter, or single span
mechanisms
  - KSR preserved on subsequent sampling calls (TryAddTag semantics)
- Formatting with up to 6 decimal digits (boundary values including
small rates like 0.00001)
- System tests in [system-tests
#6466](https://github.com/DataDog/system-tests/pull/6466)

## Other details

Related PRs across tracers:
- Java: https://github.com/DataDog/dd-trace-java/pull/10802
- Ruby: https://github.com/DataDog/dd-trace-rb/pull/5436
- Node.js: https://github.com/DataDog/dd-trace-js/pull/7741
- PHP: https://github.com/DataDog/dd-trace-php/pull/3701
- Rust: https://github.com/DataDog/dd-trace-rs/pull/180
- C++: https://github.com/DataDog/dd-trace-cpp/pull/288

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* [DBM] Add container tags hash to queries (if enabled) (#8061)

## Summary of changes

Add the ability to write the container tags hash to DBM queries + to the
related span.
The goal is that DBM would then query the spans bearing that hash, and
then use the container tags on this (those) spans(s) to enrich the
queries with it.
This is controlled by a setting that is disabled by default, and would
be enabled if propagation mode is "service" or greater

see RFC:
https://docs.google.com/document/d/15GtNOKGBCt6Dc-HsDNnMmCdZwhewFQx8yUlI9in5n3M
related PR in python: https://github.com/DataDog/dd-trace-py/pull/15293

## Reason for change

DBM and DSM propagate service context in outbound communications (SQL
comments, message headers), but neither product has awareness of the
container environment (e.g., `kube_cluster`, `namespace`, `pod_name`).
Propagating full container tags is not feasible due to cardinality
constraints (query cache invalidation in OracleDB/SQLServer, exponential
pathway growth in DSM) and size limitations (64–128 bytes for DBM
non-comment methods).

This is needed for the **service renaming initiative** (defining
services based on container names) and **APM primary tags**
(container-based dimensions like Kubernetes cluster).

The solution: the agent computes a hash of low-cardinality container
tags and back-propagates it to the tracer, which includes it in outbound
DBM/DSM communications. DBM then resolves the hash by correlating with
APM spans that carry the same hash as a span tag.

## Implementation details

- Add `BaseHash` static class that computes an FNV-64 hash of
`ProcessTags.SerializedTags` combined with the container tags hash from
the agent, encoded as base64
- Read the container tags hash from the Datadog Agent via
`DiscoveryService`, stored in `ContainerMetadata.ContainerTagsHash`
- `ContainerMetadata` converted from static to instance class (singleton
via `ContainerMetadata.Instance`) to improve testability
- `DatabaseMonitoringPropagator` injects the base hash into SQL comments
(as `ddsh`) when `DD_DBM_INJECT_SQL_BASEHASH` is true
- Add `_dd.dbm_container_tags_hash` span tag on `SqlTags` so DBM can
correlate the hash back to the span's container tags
- New config key `DD_DBM_INJECT_SQL_BASEHASH` (disabled by default),
intended to be enabled when DBM propagation mode is `service` or higher
- Add container ID header to `MinimalAgentHeaderHelper` for agent
communication

## Test coverage

Adding a test in DbScopeFactoryTests.cs forced me to inject the value
from pretty high, which I find a bit "dirty", but at least we don't have
to rely on global static instance in tests.

## Other details
<!-- Fixes #{issue} -->


<!--  ⚠️ Note:

Where possible, please obtain 2 approvals prior to merging. Unless
CODEOWNERS specifies otherwise, for external teams it is typically best
to have one review from a team member, and one review from apm-dotnet.
Trivial changes do not require 2 reviews.

MergeQueue is NOT enabled in this repository. If you have write access
to the repo, the PR has 1-2 approvals (see above), and all of the
required checks have passed, you can use the Squash and Merge button to
merge the PR. If you don't have write access, or you need help, reach
out in the #apm-dotnet channel in Slack.
-->

---------

Co-authored-by: Daniel Romano <108014683+daniel-romano-DD@users.noreply.github.com>
Co-authored-by: Andrew Lock <andrew.lock@datadoghq.com>

* Stabilize test-agent readiness in smoke tests (#8368)

## Summary of changes
Increased test-agent readiness timeout from 30s to 60s and added
retry-attempt logging.

```
20:49:49 [ERR] Target RunArtifactSmokeTests has thrown an exception
System.TimeoutException: Test agent did not become ready within 30 seconds
   at SmokeTests.SmokeTestRunner.WaitForTestAgentAsync(HttpClient httpClient) in /build/SmokeTests/SmokeTestRunner.cs:line 311

```

## Reason for change
Smoke tests were intermittently [failing
](https://dev.azure.com/datadoghq/dd-trace-dotnet/_build/results?buildId=198100&view=logs&j=407dddad-44b6-5ebb-3a0f-ff0eff8ee16f&t=c183c8c0-4c19-505d-2688-c00b1688124f)in
CI when the test-agent container startup was delayed on busy runners.

## Implementation details
- Updated `WaitForTestAgentAsync` in `SmokeTestRunner.cs`
- Bumped timeout from 30s to 60s
- Added warning log on each failed readiness check (attempt number +
error message)

---------

Co-authored-by: datadog-prod-us1-3[bot] <266080212+datadog-prod-us1-3[bot]@users.noreply.github.com>

* Fix `CA1872` - Prefer `Convert.ToHexString` over `BitConverter.ToString` (#8333)

## Summary of changes

Stop using `BitConverter.ToString` to convert a `byte[]` into a `string`

## Reason for change

The `CA1872` analyzer suggests to use `Convert.ToHexString` instead.
That's not available in <.NET 6, but ultimately it just calls
`HexConverter.ToString(bytes, HexConverter.Casing.Upper)` which we have
vendored, so we can just use that instead in that case.

## Implementation details

- Enable the analyzer
- Fix the one violation

## Test coverage

Covered by existing

## Other details

https://datadoghq.atlassian.net/browse/LANGPLAT-813

We could argue whether it's worth having the `#if`, but it feels like we
should generally use the built-in types where they're available. But
_maybe_ that means we should make `HexConverter.ToString()` delegate to
the built-in `Convert.ToHexString()` method? i.e. move the `#if` to be
an implementation detail of our vendored `HexConverter`? I'm undecided.

* Enable `CA1859` - Use concrete types when possible (#8335)

## Summary of changes

Enables the `CA1859` analyzer, and fixes the violations

## Reason for change

We want to enable these perf analyzers. The reasoning in this one is
that if you return concrete types, the compiler is more able to make
optimizations e.g. using struct-based enumerators and/or avoiding
virtual method dispatch.

That said, this one is potentially _kind_ of annoying, and I think
there's a question of whether it's worth enabling or not. All in all,
it's likely to be much more beneficial for .NET Framework for example,
vs .NET 10.

The analyzer also only applies to `private` members too, which means
there's likely a lot more low-hanging fruit that we could switch to
using `List<T>` etc for gains.

## Implementation details

- Enable the analyzer
- Fix the violations by using the suggested concrete types
- In a couple of cases where the results differ per TFM, use either
`#if` (to fix it) or `#pragma` (to ignore it)

## Test coverage

Covered by existing

## Other details

https://datadoghq.atlassian.net/browse/LANGPLAT-813

Stacked on 
- https://github.com/DataDog/dd-trace-dotnet/pull/8332
- https://github.com/DataDog/dd-trace-dotnet/pull/8333

* Enable `CA1851` - Avoid multiple enumeration of collections (#8341)

## Summary of changes

Enables `CA1851`, fixes one violations, and ignores an existing

## Reason for change

We want to enable this analayzer. Although, interestingly, there are
cases where this _won't_ touch, which we should potentially also have
analyzers for. For example:

- We instrument a method that takes an `IEnumerable` (could be call
target, could be callsite aspects)
- We enumerate the collection
- The instrumented method runs, enumerating it again

If this isn't a materialized collection, this could be very expensive.
Potentially, we should instead do:

- Call `ToList()` on the parameter
- Do our thing
- Pass the list into the method

But that _also_ has risks 😅 So ideally... we just don't touch
`IEnumerable`s 😅 🤷‍♂️

## Implementation details

- Enable the analyzer
- For the `StringModuleImpl`, The `Count()` call was to ensure we pass
`addDelimiterRanges: false` on the _final_ iteration. Converting to a
"manually implemented" `foreach` using a "peek ahead" approach avoids
the multiple enumerations
- For the `Encoder`, it's all recursive and really hard to follow what
the inputs are actually going to be here, so I just declared bankruptcy
and put the `#pragma` in. If ASM want to fix it "properly" later, that's
good, but don't want to block enabling the analyzer because of it

## Test coverage

Covered by existing

## Other details

https://datadoghq.atlassian.net/browse/LANGPLAT-813

Stacked on 
- https://github.com/DataDog/dd-trace-dotnet/pull/8332
- https://github.com/DataDog/dd-trace-dotnet/pull/8333
- https://github.com/DataDog/dd-trace-dotnet/pull/8335

* Fix swapped SpanKinds and missing tags in IbmMqHelper (#8369)

## Summary of changes

Fix three pre-existing bugs in `IbmMqHelper`:

- **Swapped SpanKinds**: `CreateProducerScope` passed
`SpanKinds.Consumer` and `CreateConsumerScope` passed
`SpanKinds.Producer` to `CreateIbmMqTags` — now corrected.
- **Missing tags in producer scope**: `CreateProducerScope` created and
populated `IbmMqTags` but never passed them to `StartActiveInternal`, so
tags (including `TopicName`) were silently discarded.

## Reason for change

Producer spans were tagged as consumers and vice versa, and producer
spans were missing messaging-specific tags entirely.

## Implementation details

- Swap `SpanKinds.Consumer` → `SpanKinds.Producer` in
`CreateProducerScope` (line 71)
- Swap `SpanKinds.Producer` → `SpanKinds.Consumer` in
`CreateConsumerScope` (line 138)
- Add `tags: tags` parameter to `StartActiveInternal` in
`CreateProducerScope`

## Test coverage

Existing integration tests cover IBM MQ span creation. No new tests
required — this is a straightforward value correction.

## Other details

Pre-existing bugs, not introduced by any recent PR.

---------

Co-authored-by: Andrew Lock <andrew.lock@datadoghq.com>
Co-authored-by: Steven Bouwkamp <stevenbouwkamp@gmail.com>

* Add OTEL_RESOURCE_ATTRIBUTES to claude settings (#8378)

## Summary of changes

This adds `"OTEL_RESOURCE_ATTRIBUTES":
"repo.owner=DataDog,repo.name=dd-trace-dotnet"` to our claude settings

## Reason for change

This will make it so that our telemetry marks that if we are working on
the repo with Claude that it will report our repository.

I don't think there is any functional change here besides the fact that
I want to make my telemetry go from `N/A` to `dd-trace-dotnet`

## Implementation details

Followed
https://datadoghq.atlassian.net/wiki/spaces/AIDEVX/pages/5689508824/Repo+Config#Repo-Tags-in-Telemetry

## Test coverage

## Other details
<!-- Fixes #{issue} -->


<!--  ⚠️ Note:

Where possible, please obtain 2 approvals prior to merging. Unless
CODEOWNERS specifies otherwise, for external teams it is typically best
to have one review from a team member, and one review from apm-dotnet.
Trivial changes do not require 2 reviews.

MergeQueue is NOT enabled in this repository. If you have write access
to the repo, the PR has 1-2 approvals (see above), and all of the
required checks have passed, you can use the Squash and Merge button to
merge the PR. If you don't have write access, or you need help, reach
out in the #apm-dotnet channel in Slack.
-->

* chore: re-enable dependabot with 2-day cooldown (#8377)

> [!NOTE]
> **Merge only if this is still needed and your repo is not managed by
ADMS.**
> If your repository is already managed by ADMS, feel free to close or
ignore this PR.

---

We are adding a 2-day cooldown on dependencies to reduce the risk of
zero-day vulnerabilities.

This PR re-enables your Dependabot configuration and introduces the
cooldown setting. If you notice any other Dependabot configurations in
your repo that are missing the cooldown, please ensure it is added.

If your repository is already managed by ADMS and no longer requires
these configurations, feel free to close or ignore the PR.

Signed-off-by: Moe Zein <moe.zein@datadoghq.com>

* chore(ci) update one-pipeline (#8351)

This pull request updates one-pipeline to a newer version.

Recent changes:
* Use artifact-gateway to authenticate promote-oci jobs
* Allow bigger lib injection and oci package sizes
* Config registry validation improvements and fixes


Some of these changes may have already applied depending on your
previous version of one-pipeline. See the libdatadog-build repository
for all changes

Co-authored-by: gh-worker-campaigns-3e9aa4[bot] <244854796+gh-worker-campaigns-3e9aa4[bot]@users.noreply.github.com>

* Fix multiple termination signals on .NET 10+ (#8374)

## Summary of changes

- Un-skip `TerminationSignalTests`
- Run `TerminationSignalTests` on more TFMs
- Fix bug with multiple-termination signals on .NET 10
- Wait for dogstatsd to finish flushing on exit

## Reason for change

As part of the recent runtime metrics work (#8265), we skipped the
`TerminationSignalTests`, as we found they were flaky with the new
changes on .NET 10 (and failed outright if we properly `await`-ed for
dogstatsd to flush on exit). Ultimately, this comes down to essentially
a race condition in the new termination behaviour on .NET 10.

Previously, we had this for .NET 10:
- On startup, register for POSIX signals
- When a posix signal fires, unregister the signals, and start
shutdown/flush etc
- After a small delay (100ms) in the test, send another posix signal
- As we have already unregistered our handler, the app goes straight to
shutdown, and we don't finish flushing.

This doesn't affect <.NET 10, because POSIX is handled by the runtime,
and they queue handling of the subsequent signals while the first one is
ongoing.

## Implementation details

The fix is essentially two changes:
- Don't un-register the POSIX handlers
- On subsequent POSIX signals wait for the first handler to complete
before exiting

This only affects the .NET 10 path, as the POSIX handlers only fire
explicitly on those paths.

As an aside, this allows enabling the statsd flush on shutdown.

## Test coverage

I unskipped the currently-skipped test, and expanded the
`TerminationSignalTests` to cover .NET 8+, instead of just .NET 10, so
that we know we're _actually_ getting the same behaviour in both cases.
(.NET 8 was a somewhat arbitrary choice, we could expand it further if
we wanted to, but doesn't necessarily seem worth it to me).

I then tested that in CI and saw it fail, before making the fix.

## Other details

There's one "interesting" change of behaviour in terms of `Cancel`. 🤖 is
adamant we _Shouldn't_ cancel the default signal handling on the first
handler, because we _want_ the "default signal handling" to kick in
_after_ we've run our shutdown hooks. I'm not entirely sure if that's
true or not tbh, but it doesn't seem to affect the tests one way or
another so I'm guessing, meh? 🤷‍♂️

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Move `TracerSettings` helper methods to `TestHelpers` project (#8375)

## Summary of changes

Move the `TracerSettings.Create()` methods which are only there for
testing convenience into the `TestHelpers` project

## Reason for change

They don't need to be in the main binary

## Implementation details

- Moved the settings to the TestHelpers project
- Created them as static extension members, so the call-site doesn't
change at all (partially as an experiment)
- Fixed a culture bug @vandonr was running into

## Test coverage

Covered by existing

---------

Co-authored-by: Raphaël Vandon <raphael.vandon@datadog.com>

* Bump the gh-actions-packages group across 3 directories with 10 updates (#8381)

Bumps the gh-actions-packages group with 6 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [actions/setup-dotnet](https://github.com/actions/setup-dotnet) |
`5.1.0` | `5.2.0` |
|
[DataDog/dd-octo-sts-action](https://github.com/datadog/dd-octo-sts-action)
| `1.0.3` | `1.0.4` |
|
[softprops/action-gh-release](https://github.com/softprops/action-gh-release)
| `2.5.0` | `2.6.1` |
| [github/codeql-action](https://github.com/github/codeql-action) |
`4.32.4` | `4.34.1` |
|
[advanced-security/filter-sarif](https://github.com/advanced-security/filter-sarif)
| `1.0.1` | `1.1` |
|
[actions/create-github-app-token](https://github.com/actions/create-github-app-token)
| `2.2.1` | `3.0.0` |

Bumps the gh-actions-packages group with 3 updates in the
/.github/actions/create-system-test-docker-base-images directory:
[docker/setup-qemu-action](https://github.com/docker/setup-qemu-action),
[docker/setup-buildx-action](https://github.com/docker/setup-buildx-action)
and
[docker/build-push-action](https://github.com/docker/build-push-action).
Bumps the gh-actions-packages group with 1 update in the
/.github/actions/publish-debug-symbols directory:
[actions/setup-node](https://github.com/actions/setup-node).

Updates `actions/setup-dotnet` from 5.1.0 to 5.2.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/setup-dotnet/releases">actions/setup-dotnet's
releases</a>.</em></p>
<blockquote>
<h2>v5.2.0</h2>
<h2>What's changed</h2>
<h3>Enhancements</h3>
<ul>
<li>Add support for workloads input by <a
href="https://github.com/gowridurgad"><code>@​gowridurgad</code></a> in
<a
href="https://redirect.github.com/actions/setup-dotnet/pull/693">actions/setup-dotnet#693</a></li>
<li>Add support for optional architecture input for cross-architecture
.NET installs by <a
href="https://github.com/priya-kinthali"><code>@​priya-kinthali</code></a>
in <a
href="https://redirect.github.com/actions/setup-dotnet/pull/700">actions/setup-dotnet#700</a></li>
</ul>
<h3>Dependency Updates</h3>
<ul>
<li>Upgrade fast-xml-parser from 4.4.1 to 5.3.6 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/setup-dotnet/pull/671">actions/setup-dotnet#671</a></li>
<li>Upgrade minimatch from 3.1.2 to 3.1.5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/setup-dotnet/pull/705">actions/setup-dotnet#705</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/setup-dotnet/compare/v5...v5.2.0">https://github.com/actions/setup-dotnet/compare/v5...v5.2.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/actions/setup-dotnet/commit/c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7"><code>c2fa09f</code></a>
Bump minimatch from 3.1.2 to 3.1.5 (<a
href="https://redirect.github.com/actions/setup-dotnet/issues/705">#705</a>)</li>
<li><a
href="https://github.com/actions/setup-dotnet/commit/02574b18e2dc57a218ee4e11ba1e1603c67236e8"><code>02574b1</code></a>
Add support for optional architecture input for cross-architecture .NET
insta...</li>
<li><a
href="https://github.com/actions/setup-dotnet/commit/16c7b3c2fa55a0e394467d22512b84fda46adf63"><code>16c7b3c</code></a>
Bump fast-xml-parser from 4.4.1 to 5.3.6 (<a
href="https://redirect.github.com/actions/setup-dotnet/issues/671">#671</a>)</li>
<li><a
href="https://github.com/actions/setup-dotnet/commit/131b410979e0b49e2162c0718030257b22d6dc2c"><code>131b410</code></a>
Add support for workloads input (<a
href="https://redirect.github.com/actions/setup-dotnet/issues/693">#693</a>)</li>
<li>See full diff in <a
href="https://github.com/actions/setup-dotnet/compare/baa11fbfe1d6520db94683bd5c7a3818018e4309...c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7">compare
view</a></li>
</ul>
</details>
<br />

Updates `DataDog/dd-octo-sts-action` from 1.0.3 to 1.0.4
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/DataDog/dd-octo-sts-action/commit/96a25462dbcb10ebf0bfd6e2ccc917d2ab235b9a"><code>96a2546</code></a>
Fix typo in Readme (<a
href="https://redirect.github.com/datadog/dd-octo-sts-action/issues/18">#18</a>)</li>
<li><a
href="https://github.com/DataDog/dd-octo-sts-action/commit/9691c26e1de0f1f26e1e8708c5c34b4f64e43f5f"><code>9691c26</code></a>
Merge pull request <a
href="https://redirect.github.com/datadog/dd-octo-sts-action/issues/14">#14</a>
from DataDog/improve/parse-jwt-claims</li>
<li><a
href="https://github.com/DataDog/dd-octo-sts-action/commit/b98b59d08d3575cbda7001bddfe86633787536e8"><code>b98b59d</code></a>
Merge pull request <a
href="https://redirect.github.com/datadog/dd-octo-sts-action/issues/13">#13</a>
from DataDog/improve/fetch-error-url-logging</li>
<li><a
href="https://github.com/DataDog/dd-octo-sts-action/commit/e7953d4e870e933635e6afa9172b3957b568c417"><code>e7953d4</code></a>
Merge pull request <a
href="https://redirect.github.com/datadog/dd-octo-sts-action/issues/15">#15</a>
from DataDog/improve/ci-workflow-hardening</li>
<li><a
href="https://github.com/DataDog/dd-octo-sts-action/commit/e47344e9570a80d3a7d333a339ace4a5e88b7646"><code>e47344e</code></a>
Merge pull request <a
href="https://redirect.github.com/datadog/dd-octo-sts-action/issues/16">#16</a>
from DataDog/improve/bump-node24</li>
<li><a
href="https://github.com/DataDog/dd-octo-sts-action/commit/5a7a632cb3be2334cd1515df9c74eb3103942b50"><code>5a7a632</code></a>
Bump Node.js runtime from node20 to node24</li>
<li><a
href="https://github.com/DataDog/dd-octo-sts-action/commit/260fcf964ad38660b2abc359216586af9d31a05d"><code>260fcf9</code></a>
Add parseJwtClaims() function with tests, replace fragile inline
parsing</li>
<li><a
href="https://github.com/DataDog/dd-octo-sts-action/commit/371c4d81ebd5ed74dfcc7bb2ab234d9f1e30fe65"><code>371c4d8</code></a>
Harden CI workflows with least-privilege permissions and credential
controls</li>
<li><a
href="https://github.com/DataDog/dd-octo-sts-action/commit/1fc658893bed0edd73a7e284f6266e3fc4bdc93e"><code>1fc6588</code></a>
Include URL in fetchWithRetry error messages</li>
<li><a
href="https://github.com/DataDog/dd-octo-sts-action/commit/0b31f95da950c7562ef40f6447086e75515897ce"><code>0b31f95</code></a>
Harden CI workflows with least-privilege permissions and credential
controls</li>
<li>Additional commits viewable in <a
href="https://github.com/datadog/dd-octo-sts-action/compare/acaa02eee7e3bb0839e4272dacb37b8f3b58ba80...96a25462dbcb10ebf0bfd6e2ccc917d2ab235b9a">compare
view</a></li>
</ul>
</details>
<br />

Updates `softprops/action-gh-release` from 2.5.0 to 2.6.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/softprops/action-gh-release/releases">softprops/action-gh-release's
releases</a>.</em></p>
<blockquote>
<h2>v2.6.1</h2>
<p><code>2.6.1</code> is a patch release focused on restoring linked
discussion thread creation when
<code>discussion_category_name</code> is set. It fixes
<code>[#764](https://github.com/softprops/action-gh-release/issues/764)</code>,
where the draft-first publish flow
stopped carrying the discussion category through the final publish
step.</p>
<p>If you still hit an issue after upgrading, please open a report with
the bug template and include a minimal repro or sanitized workflow
snippet where possible.</p>
<h2>What's Changed</h2>
<h3>Bug fixes 🐛</h3>
<ul>
<li>fix: preserve discussion category on publish by <a
href="https://github.com/chenrui333"><code>@​chenrui333</code></a> in <a
href="https://redirect.github.com/softprops/action-gh-release/pull/765">softprops/action-gh-release#765</a></li>
</ul>
<h2>v2.6.0</h2>
<p><code>2.6.0</code> is a minor release centered on
<code>previous_tag</code> support for
<code>generate_release_notes</code>,
which lets workflows pin GitHub's comparison base explicitly instead of
relying on the default range.
It also includes the recent concurrent asset upload recovery fix, a
<code>working_directory</code> docs sync,
a checked-bundle freshness guard for maintainers, and clearer
immutable-prerelease guidance where
GitHub platform behavior imposes constraints on how prerelease asset
uploads can be published.</p>
<p>If you still hit an issue after upgrading, please open a report with
the bug template and include a minimal repro or sanitized workflow
snippet where possible.</p>
<h2>What's Changed</h2>
<h3>Exciting New Features 🎉</h3>
<ul>
<li>feat: support previous_tag for generate_release_notes by <a
href="https://github.com/pocesar"><code>@​pocesar</code></a> in <a
href="https://redirect.github.com/softprops/action-gh-release/pull/372">softprops/action-gh-release#372</a></li>
</ul>
<h3>Bug fixes 🐛</h3>
<ul>
<li>fix: recover concurrent asset metadata 404s by <a
href="https://github.com/chenrui333"><code>@​chenrui333</code></a> in <a
href="https://redirect.github.com/softprops/action-gh-release/pull/760">softprops/action-gh-release#760</a></li>
</ul>
<h3>Other Changes 🔄</h3>
<ul>
<li>docs: clarify reused draft release behavior by <a
href="https://github.com/chenrui333"><code>@​chenrui333</code></a> in <a
href="https://redirect.github.com/softprops/action-gh-release/pull/759">softprops/action-gh-release#759</a></li>
<li>docs: clarify working_directory input by <a
href="https://github.com/chenrui333"><code>@​chenrui333</code></a> in <a
href="https://redirect.github.com/softprops/action-gh-release/pull/761">softprops/action-gh-release#761</a></li>
<li>ci: verify dist bundle freshness by <a
href="https://github.com/chenrui333"><code>@​chenrui333</code></a> in <a
href="https://redirect.github.com/softprops/action-gh-release/pull/762">softprops/action-gh-release#762</a></li>
<li>fix: clarify immutable prerelease uploads by <a
href="https://github.com/chenrui333"><code>@​chenrui333</code></a> in <a
href="https://redirect.github.com/softprops/action-gh-release/pull/763">softprops/action-gh-release#763</a></li>
</ul>
<h2>v2.5.3</h2>
<!-- raw HTML omitted -->
<p><code>2.5.3</code> is a patch release focused on the remaining
path-handling and release-selection bugs uncovered after
<code>2.5.2</code>.
It fixes
<code>[#639](https://github.com/softprops/action-gh-release/issues/639)</code>,
<code>[#571](https://github.com/softprops/action-gh-release/issues/571)</code>,
<code>[#280](https://github.com/softprops/action-gh-release/issues/280)</code>,
<code>[#614](https://github.com/softprops/action-gh-release/issues/614)</code>,
<code>[#311](https://github.com/softprops/action-gh-release/issues/311)</code>,
<code>[#403](https://github.com/softprops/action-gh-release/issues/403)</code>,
and
<code>[#368](https://github.com/softprops/action-gh-release/issues/368)</code>.
It also adds documentation clarifications for
<code>[#541](https://github.com/softprops/action-gh-release/issues/541)</code>,
<code>[#645](https://github.com/softprops/action-gh-release/issues/645)</code>,
<code>[#542](https://github.com/softprops/action-gh-release/issues/542)</code>,
<code>[#393](https://github.com/softprops/action-gh-release/issues/393)</code>,
and
<code>[#411](https://github.com/softprops/action-gh-release/issues/411)</code>,
where the current behavior is either usage-sensitive or constrained by
GitHub platform limits rather than an action-side runtime bug.</p>
<p>If you still hit an issue after upgrading, please open a report with
the bug template and include a minimal repro or sanitized workflow
snippet where possible.</p>
<h2>What's Changed</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md">softprops/action-gh-release's
changelog</a>.</em></p>
<blockquote>
<h2>2.6.1</h2>
<p><code>2.6.1</code> is a patch release focused on restoring linked
discussion thread creation when
<code>discussion_category_name</code> is set. It fixes
<code>[#764](https://github.com/softprops/action-gh-release/issues/764)</code>,
where the draft-first publish flow
stopped carrying the discussion category through the final publish
step.</p>
<p>If you still hit an issue after upgrading, please open a report with
the bug template and include a minimal repro or sanitized workflow
snippet where possible.</p>
<h2>What's Changed</h2>
<h3>Bug fixes 🐛</h3>
<ul>
<li>fix: preserve discussion category on publish by <a
href="https://github.com/chenrui333"><code>@​chenrui333</code></a> in <a
href="https://redirect.github.com/softprops/action-gh-release/pull/765">softprops/action-gh-release#765</a></li>
</ul>
<h2>2.6.0</h2>
<p><code>2.6.0</code> is a minor release centered on
<code>previous_tag</code> support for
<code>generate_release_notes</code>,
which lets workflows pin GitHub's comparison base explicitly instead of
relying on the default range.
It also includes the recent concurrent asset upload recovery fix, a
<code>working_directory</code> docs sync,
a checked-bundle freshness guard for maintainers, and clearer
immutable-prerelease guidance where
GitHub platform behavior imposes constraints on how prerelease asset
uploads can be published.</p>
<p>If you still hit an issue after upgrading, please open a report with
the bug template and include a minimal repro or sanitized workflow
snippet where possible.</p>
<h2>What's Changed</h2>
<h3>Exciting New Features 🎉</h3>
<ul>
<li>feat: support previous_tag for generate_release_notes by <a
href="https://github.com/pocesar"><code>@​pocesar</code></a> in <a
href="https://redirect.github.com/softprops/action-gh-release/pull/372">softprops/action-gh-release#372</a></li>
</ul>
<h3>Bug fixes 🐛</h3>
<ul>
<li>fix: recover concurrent asset metadata 404s by <a
href="https://github.com/chenrui333"><code>@​chenrui333</code></a> in <a
href="https://redirect.github.com/softprops/action-gh-release/pull/760">softprops/action-gh-release#760</a></li>
</ul>
<h3>Other Changes 🔄</h3>
<ul>
<li>docs: clarify reused draft release behavior by <a
href="https://github.com/chenrui333"><code>@​chenrui333</code></a> in <a
href="https://redirect.github.com/softprops/action-gh-release/pull/759">softprops/action-gh-release#759</a></li>
<li>docs: clarify working_directory input by <a
href="https://github.com/chenrui333"><code>@​chenrui333</code></a> in <a
href="https://redirect.github.com/softprops/action-gh-release/pull/761">softprops/action-gh-release#761</a></li>
<li>ci: verify dist bundle freshness by <a
href="https://github.com/chenrui333"><code>@​chenrui333</code></a> in <a
href="https://redirect.github.com/softprops/action-gh-release/pull/762">softprops/action-gh-release#762</a></li>
<li>fix: clarify immutable prerelease uploads by <a
href="https://github.com/chenrui333"><code>@​chenrui333</code></a> in <a
href="https://redirect.github.com/softprops/action-gh-release/pull/763">softprops/action-gh-release#763</a></li>
</ul>
<h2>2.5.3</h2>
<p><code>2.5.3</code> is a patch release focused on the remaining
path-handling and release-selection bugs uncovered after
<code>2.5.2</code>.
It fixes
<code>[#639](https://github.com/softprops/action-gh-release/issues/639)</code>,
<code>[#571](https://github.com/softprops/action-gh-release/issues/571)</code>,
<code>[#280](https://github.com/softprops/action-gh-release/issues/280)</code>,
<code>[#614](https://github.com/softprops/action-gh-release/issues/614)</code>,
<code>[#311](https://github.com/softprops/action-gh-release/issues/311)</code>,
<code>[#403](https://github.com/softprops/action-gh-release/issues/403)</code>,
and
<code>[#368](https://github.com/softprops/action-gh-release/issues/368)</code>.
It also adds documentation clarifications for
<code>[#541](https://github.com/softprops/action-gh-release/issues/541)</code>,
<code>[#645](https://github.com/softprops/action-gh-release/issues/645)</code>,
<code>[#542](https://github.com/softprops/action-gh-release/issues/542)</code>,
<code>[#393](https://github.com/softprops/action-gh-release/issues/393)</code>,
and
<code>[#411](https://github.com/softprops/action-gh-release/issues/411)</code>,
where the current behavior is either usage-sensitive or constrained by
GitHub platform limits rather than an action-side runtime bug.</p>
<p>If you still hit an issue after upgrading, please open a report with
the bug template and include a minimal repro or sanitized workflow
snippet where possible.</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/softprops/action-gh-release/commit/153bb8e04406b158c6c84fc1615b65b24149a1fe"><code>153bb8e</code></a>
release 2.6.1</li>
<li><a
href="https://github.com/softprops/action-gh-release/commit/569deb874d08cd8cc0aa24af7c0b21160fe4b0e4"><code>569deb8</code></a>
fix: preserve discussion category when publishing releases (<a
href="https://redirect.github.com/softprops/action-gh-release/issues/765">#765</a>)</li>
<li><a
href="https://github.com/softprops/action-gh-release/commit/26e8ad27a09a225049a7075d7ec1caa2df6ff332"><code>26e8ad2</code></a>
release 2.6.0</li>
<li><a
href="https://github.com/softprops/action-gh-release/commit/b959f31e968fb47fb7bb823087fc092d5613e0a4"><code>b959f31</code></a>
fix: clarify immutable prerelease uploads (<a
href="https://redirect.github.com/softprops/action-gh-release/issues/763">#763</a>)</li>
<li><a
href="https://github.com/softprops/action-gh-release/commit/8a8510e3a0d8dfc9296171fd405ca8c8ea6206a4"><code>8a8510e</code></a>
ci: verify dist bundle freshness (<a
href="https://redirect.github.com/softprops/action-gh-release/issues/762">#762</a>)</li>
<li><a
href="https://github.com/softprops/action-gh-release/commit/438c15ddf5b01e992ef98dc29cea3f9992ab54ac"><code>438c15d</code></a>
docs: clarify working_directory input (<a
href="https://redirect.github.com/softprops/action-gh-release/issues/761">#761</a>)</li>
<li><a
href="https://github.com/softprops/action-gh-release/commit/6ca3b5d96e3a0fac11dc53f0809c2cb029e64902"><code>6ca3b5d</code></a>
fix: recover concurrent asset metadata 404s (<a
href="https://redirect.github.com/softprops/action-gh-release/issues/760">#760</a>)</li>
<li><a
href="https://github.com/softprops/action-gh-release/commit/11f917660b31d6d56980ea3261f210556a812bd0"><code>11f9176</code></a>
chore: add RELEASE.md</li>
<li><a
href="https://github.com/softprops/action-gh-release/commit/1f3f350167714515d2bcf8a18afcc5e8e0a362a8"><code>1f3f350</code></a>
feat: add AGENTS.md</li>
<li><a
href="https://github.com/softprops/action-gh-release/commit/37819cb191890d306d21cfb5ac4e7a358f0a6e4f"><code>37819cb</code></a>
docs: clarify reused draft release behavior (<a
href="https://redirect.github.com/softprops/action-gh-release/issues/759">#759</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/softprops/action-gh-release/compare/a06a81a03ee405af7f2048a818ed3f03bbf83c7b...153bb8e04406b158c6c84fc1615b65b24149a1fe">compare
view</a></li>
</ul>
</details>
<br />

Updates `github/codeql-action` from 4.32.4 to 4.34.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/github/codeql-action/releases">github/codeql-action's
releases</a>.</em></p>
<blockquote>
<h2>v4.34.1</h2>
<ul>
<li>Downgrade default CodeQL bundle version to <a
…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: core Tracer core tag: ai generated Largely based on code generated by an AI or LLM type: enhancement Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants