Skip to content

Andrew/r and d/non recording spans - #7916

Draft
andrewlock wants to merge 11 commits into
masterfrom
andrew/r-and-d/non-recording-spans
Draft

Andrew/r and d/non recording spans#7916
andrewlock wants to merge 11 commits into
masterfrom
andrew/r-and-d/non-recording-spans

Conversation

@andrewlock

Copy link
Copy Markdown
Member

Summary of changes

Reason for change

Implementation details

Test coverage

Other details

@andrewlock
andrewlock force-pushed the andrew/r-and-d/non-recording-spans branch from 3b7d0ee to 2d09a88 Compare April 17, 2026 13:53
@dd-trace-dotnet-ci-bot

dd-trace-dotnet-ci-bot Bot commented Apr 20, 2026

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (7916) and master.

✅ No regressions detected - check the details below

Full Metrics Comparison

FakeDbCommand

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration74.09 ± (73.95 - 74.48) ms74.52 ± (74.41 - 74.92) ms+0.6%✅⬆️
.NET Framework 4.8 - Bailout
duration76.97 ± (76.92 - 77.27) ms77.37 ± (77.35 - 77.70) ms+0.5%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1105.31 ± (1105.54 - 1114.90) ms1105.49 ± (1107.18 - 1115.21) ms+0.0%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.34 ± (22.30 - 22.38) ms22.50 ± (22.45 - 22.55) ms+0.7%✅⬆️
process.time_to_main_ms83.71 ± (83.51 - 83.92) ms85.14 ± (84.87 - 85.41) ms+1.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.92 ± (10.92 - 10.93) MB10.94 ± (10.93 - 10.94) MB+0.1%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.49 ± (22.45 - 22.52) ms22.38 ± (22.33 - 22.43) ms-0.5%
process.time_to_main_ms85.42 ± (85.19 - 85.64) ms85.65 ± (85.46 - 85.84) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.96 ± (10.96 - 10.96) MB10.97 ± (10.96 - 10.97) MB+0.1%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms216.37 ± (215.59 - 217.14) ms213.30 ± (212.40 - 214.19) ms-1.4%
process.time_to_main_ms546.16 ± (544.83 - 547.48) ms543.42 ± (542.20 - 544.63) ms-0.5%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.39 ± (48.36 - 48.42) MB48.63 ± (48.61 - 48.66) MB+0.5%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.5%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms21.36 ± (21.31 - 21.40) ms21.40 ± (21.34 - 21.46) ms+0.2%✅⬆️
process.time_to_main_ms73.84 ± (73.67 - 74.02) ms75.02 ± (74.75 - 75.29) ms+1.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.62 ± (10.62 - 10.63) MB10.63 ± (10.63 - 10.63) MB+0.1%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.52 ± (21.46 - 21.58) ms21.37 ± (21.32 - 21.41) ms-0.7%
process.time_to_main_ms76.97 ± (76.67 - 77.26) ms76.85 ± (76.62 - 77.08) ms-0.2%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.74 ± (10.74 - 10.75) MB10.74 ± (10.74 - 10.74) MB-0.0%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms368.27 ± (366.16 - 370.38) ms372.03 ± (370.07 - 373.98) ms+1.0%✅⬆️
process.time_to_main_ms546.53 ± (545.18 - 547.87) ms550.47 ± (549.17 - 551.76) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed50.06 ± (50.04 - 50.08) MB50.08 ± (50.05 - 50.10) MB+0.0%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.1%
.NET 8 - Baseline
process.internal_duration_ms19.36 ± (19.33 - 19.39) ms19.35 ± (19.32 - 19.38) ms-0.0%
process.time_to_main_ms72.73 ± (72.56 - 72.90) ms72.61 ± (72.44 - 72.78) ms-0.2%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.67 ± (7.66 - 7.67) MB7.68 ± (7.68 - 7.69) MB+0.2%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.49 ± (19.44 - 19.53) ms19.71 ± (19.65 - 19.76) ms+1.1%✅⬆️
process.time_to_main_ms74.44 ± (74.21 - 74.66) ms76.37 ± (76.11 - 76.63) ms+2.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.72 ± (7.72 - 7.73) MB7.73 ± (7.72 - 7.73) MB+0.1%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms297.66 ± (295.69 - 299.63) ms296.73 ± (294.47 - 298.98) ms-0.3%
process.time_to_main_ms497.15 ± (496.05 - 498.24) ms502.89 ± (501.48 - 504.29) ms+1.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed37.00 ± (36.97 - 37.03) MB36.94 ± (36.92 - 36.97) MB-0.1%
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)-0.2%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration196.98 ± (196.45 - 197.40) ms198.42 ± (198.19 - 199.04) ms+0.7%✅⬆️
.NET Framework 4.8 - Bailout
duration200.85 ± (200.64 - 201.68) ms201.23 ± (201.05 - 202.01) ms+0.2%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1189.01 ± (1187.91 - 1193.66) ms1096.59 ± (1095.71 - 1100.84) ms-7.8%
.NET Core 3.1 - Baseline
process.internal_duration_ms191.41 ± (190.96 - 191.87) ms191.68 ± (191.19 - 192.17) ms+0.1%✅⬆️
process.time_to_main_ms83.07 ± (82.82 - 83.32) ms82.90 ± (82.67 - 83.14) ms-0.2%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.12 ± (16.10 - 16.14) MB16.11 ± (16.08 - 16.13) MB-0.1%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.2%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms190.92 ± (190.48 - 191.37) ms192.36 ± (191.89 - 192.82) ms+0.8%✅⬆️
process.time_to_main_ms84.16 ± (83.89 - 84.43) ms84.65 ± (84.41 - 84.89) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.16 ± (16.14 - 16.18) MB16.14 ± (16.12 - 16.16) MB-0.1%
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)+0.1%✅⬆️
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms384.94 ± (383.70 - 386.18) ms309.54 ± (308.25 - 310.83) ms-19.6%
process.time_to_main_ms531.14 ± (529.74 - 532.53) ms535.56 ± (534.26 - 536.85) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed57.24 ± (57.13 - 57.34) MB50.01 ± (49.97 - 50.05) MB-12.6%
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.9%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms195.55 ± (195.07 - 196.04) ms196.86 ± (196.44 - 197.28) ms+0.7%✅⬆️
process.time_to_main_ms71.41 ± (71.20 - 71.61) ms72.21 ± (72.00 - 72.42) ms+1.1%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.36 ± (16.33 - 16.38) MB16.40 ± (16.37 - 16.43) MB+0.3%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.1%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms195.71 ± (195.22 - 196.20) ms195.65 ± (195.30 - 196.00) ms-0.0%
process.time_to_main_ms72.43 ± (72.28 - 72.58) ms72.89 ± (72.73 - 73.05) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.42 ± (16.39 - 16.45) MB16.44 ± (16.41 - 16.46) MB+0.1%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-0.8%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms581.81 ± (578.86 - 584.76) ms479.40 ± (476.88 - 481.91) ms-17.6%
process.time_to_main_ms540.28 ± (539.21 - 541.35) ms540.05 ± (538.99 - 541.11) ms-0.0%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.15 ± (61.08 - 61.23) MB53.04 ± (53.02 - 53.07) MB-13.3%
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)-0.0%
.NET 8 - Baseline
process.internal_duration_ms193.49 ± (192.97 - 194.00) ms195.04 ± (194.55 - 195.54) ms+0.8%✅⬆️
process.time_to_main_ms71.11 ± (70.87 - 71.36) ms71.73 ± (71.53 - 71.93) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.71 ± (11.69 - 11.73) MB11.71 ± (11.68 - 11.73) MB-0.0%
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)-0.0%
.NET 8 - Bailout
process.internal_duration_ms192.34 ± (191.83 - 192.86) ms194.63 ± (194.34 - 194.92) ms+1.2%✅⬆️
process.time_to_main_ms71.69 ± (71.51 - 71.88) ms72.81 ± (72.63 - 72.99) ms+1.6%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.78 ± (11.76 - 11.80) MB11.74 ± (11.72 - 11.77) MB-0.4%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.2%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms513.71 ± (511.36 - 516.06) ms408.05 ± (405.92 - 410.18) ms-20.6%
process.time_to_main_ms489.98 ± (489.08 - 490.88) ms491.57 ± (490.80 - 492.35) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.68 ± (50.64 - 50.72) MB39.72 ± (39.69 - 39.75) MB-21.6%
runtime.dotnet.threads.count29 ± (29 - 30)30 ± (29 - 30)+0.4%✅⬆️
Comparison explanation

Execution-time benchmarks measure the whole time it takes to execute a program, and are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are highlighted in **red**. The following thresholds were used for comparing the execution times:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard.

Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph).

Duration charts
FakeDbCommand (.NET Framework 4.8)
gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7916) - mean (75ms)  : 71, 79
    master - mean (74ms)  : 70, 78

    section Bailout
    This PR (7916) - mean (78ms)  : 75, 80
    master - mean (77ms)  : 75, 79

    section CallTarget+Inlining+NGEN
    This PR (7916) - mean (1,111ms)  : 1054, 1169
    master - mean (1,110ms)  : 1042, 1179

Loading
FakeDbCommand (.NET Core 3.1)
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7916) - mean (115ms)  : 110, 119
    master - mean (113ms)  : 108, 118

    section Bailout
    This PR (7916) - mean (115ms)  : 112, 118
    master - mean (115ms)  : 112, 118

    section CallTarget+Inlining+NGEN
    This PR (7916) - mean (793ms)  : 767, 819
    master - mean (799ms)  : 765, 833

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7916) - mean (103ms)  : 97, 109
    master - mean (102ms)  : 98, 105

    section Bailout
    This PR (7916) - mean (105ms)  : 101, 109
    master - mean (105ms)  : 100, 110

    section CallTarget+Inlining+NGEN
    This PR (7916) - mean (953ms)  : 921, 985
    master - mean (943ms)  : 908, 979

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7916) - mean (100ms)  : 97, 103
    master - mean (100ms)  : 97, 103

    section Bailout
    This PR (7916) - mean (104ms)  : 98, 110
    master - mean (102ms)  : 97, 107

    section CallTarget+Inlining+NGEN
    This PR (7916) - mean (829ms)  : 785, 874
    master - mean (826ms)  : 784, 868

Loading
HttpMessageHandler (.NET Framework 4.8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7916) - mean (199ms)  : 194, 203
    master - mean (197ms)  : 191, 203

    section Bailout
    This PR (7916) - mean (202ms)  : 197, 206
    master - mean (201ms)  : 196, 207

    section CallTarget+Inlining+NGEN
    This PR (7916) - mean (1,098ms)  : 1063, 1134
    master - mean (1,191ms)  : 1149, 1232

Loading
HttpMessageHandler (.NET Core 3.1)
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7916) - mean (284ms)  : 276, 291
    master - mean (283ms)  : 272, 294

    section Bailout
    This PR (7916) - mean (286ms)  : 276, 296
    master - mean (285ms)  : 277, 293

    section CallTarget+Inlining+NGEN
    This PR (7916) - mean (885ms)  : 860, 910
    master - mean (956ms)  : 936, 976

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7916) - mean (277ms)  : 272, 282
    master - mean (275ms)  : 268, 283

    section Bailout
    This PR (7916) - mean (277ms)  : 273, 281
    master - mean (277ms)  : 271, 283

    section CallTarget+Inlining+NGEN
    This PR (7916) - mean (1,047ms)  : 1012, 1081
    master - mean (1,151ms)  : 1101, 1201

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7916) - mean (276ms)  : 271, 282
    master - mean (275ms)  : 268, 281

    section Bailout
    This PR (7916) - mean (277ms)  : 273, 281
    master - mean (274ms)  : 268, 280

    section CallTarget+Inlining+NGEN
    This PR (7916) - mean (930ms)  : 897, 962
    master - mean (1,036ms)  : 1000, 1071

Loading

@andrewlock
andrewlock force-pushed the andrew/r-and-d/non-recording-spans branch from 4a15b33 to 087dee4 Compare April 23, 2026 19:35
@andrewlock
andrewlock force-pushed the andrew/r-and-d/non-recording-spans branch from 087dee4 to 1909db4 Compare May 28, 2026 11:35
@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented May 28, 2026

Copy link
Copy Markdown

Pipelines

Fix all issues with BitsAI

⚠️ Warnings

🚦 3 Pipeline jobs failed

DataDog/apm-reliability/dd-trace-dotnet | run-benchmarks   View in Datadog   GitLab

🔧 Fix in code (Fix with Cursor). Benchmark execution failed due to a System.NullReferenceException in Benchmarks.Trace.Iast.StringAspectsBenchmark.InitTaintedContext.

Verify source generator changes have been persisted | verify_source_generators   View in Datadog   GitHub Actions

🔧 Fix in code (Fix with Cursor). Found changes in Generated folder. Ensure all source generated files are committed after local build.

Label PRs | add-labels   View in Datadog   GitHub Actions

🛟 This job is unlikely to succeed on retry. Please review your pipeline configuration. PR validation failed: No labels found in PR.

Useful? React with 👍 / 👎

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant