Skip to content

Conversation

andrewlock
Copy link
Member

@andrewlock andrewlock commented Aug 8, 2025

Summary of changes

Adds the version tag to every span

Reason for change

The agent does this anyway, and sometimes it gets it wrong!

Implementation details

Remove an if and flagellate the snapshots

Test coverage

This is the test, as long as the standard set pass, I'm happy enough to believe it covers everything

Other details

@andrewlock andrewlock added the area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) label Aug 8, 2025
@andrewlock andrewlock requested review from a team as code owners August 8, 2025 14:58
Copy link
Contributor

github-actions bot commented Aug 8, 2025

Snapshots difference summary

The following differences have been observed in committed snapshots. It is meant to help the reviewer.
The diff is simplistic, so please check some files anyway while we improve it.

4553 occurrences of :

+      version: 1.0.0,

292 occurrences of :

+      version: 1.0.x,

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Aug 8, 2025

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: def4247 | Docs | Was this helpful? Give us feedback!

@dd-trace-dotnet-ci-bot
Copy link

dd-trace-dotnet-ci-bot bot commented Aug 8, 2025

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing the following branches/commits:

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 shown 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).

gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7371) - mean (72ms)  : 71, 73
     .   : milestone, 72,
    master - mean (71ms)  : 70, 73
     .   : milestone, 71,

    section Baseline
    This PR (7371) - mean (68ms)  : 65, 71
     .   : milestone, 68,
    master - mean (68ms)  : 65, 71
     .   : milestone, 68,

    section CallTarget+Inlining+NGEN
    This PR (7371) - mean (1,030ms)  : 1004, 1056
     .   : milestone, 1030,
    master - mean (1,027ms)  : 1009, 1046
     .   : milestone, 1027,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7371) - mean (107ms)  : 106, 108
     .   : milestone, 107,
    master - mean (106ms)  : 105, 108
     .   : milestone, 106,

    section Baseline
    This PR (7371) - mean (106ms)  : 104, 108
     .   : milestone, 106,
    master - mean (106ms)  : 104, 109
     .   : milestone, 106,

    section CallTarget+Inlining+NGEN
    This PR (7371) - mean (722ms)  : 714, 731
     .   : milestone, 722,
    master - mean (723ms)  : 713, 734
     .   : milestone, 723,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7371) - mean (95ms)  : 94, 96
     .   : milestone, 95,
    master - mean (94ms)  : 93, 95
     .   : milestone, 94,

    section Baseline
    This PR (7371) - mean (94ms)  : 92, 96
     .   : milestone, 94,
    master - mean (93ms)  : 91, 96
     .   : milestone, 93,

    section CallTarget+Inlining+NGEN
    This PR (7371) - mean (679ms)  : 672, 687
     .   : milestone, 679,
    master - mean (679ms)  : 670, 687
     .   : milestone, 679,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7371) - mean (93ms)  : 92, 95
     .   : milestone, 93,
    master - mean (93ms)  : 92, 94
     .   : milestone, 93,

    section Baseline
    This PR (7371) - mean (93ms)  : 90, 96
     .   : milestone, 93,
    master - mean (92ms)  : 90, 94
     .   : milestone, 92,

    section CallTarget+Inlining+NGEN
    This PR (7371) - mean (619ms)  : 608, 630
     .   : milestone, 619,
    master - mean (621ms)  : 613, 629
     .   : milestone, 621,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7371) - mean (209ms)  : 199, 219
     .   : milestone, 209,
    master - mean (199ms)  : 193, 206
     .   : milestone, 199,

    section Baseline
    This PR (7371) - mean (206ms)  : 193, 220
     .   : milestone, 206,
    master - mean (196ms)  : 189, 204
     .   : milestone, 196,

    section CallTarget+Inlining+NGEN
    This PR (7371) - mean (1,229ms)  : crit, 1178, 1281
     .   : crit, milestone, 1229,
    master - mean (1,161ms)  : 1139, 1184
     .   : milestone, 1161,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7371) - mean (305ms)  : crit, 294, 317
     .   : crit, milestone, 305,
    master - mean (281ms)  : 276, 287
     .   : milestone, 281,

    section Baseline
    This PR (7371) - mean (305ms)  : 290, 319
     .   : milestone, 305,
    master - mean (279ms)  : 273, 286
     .   : milestone, 279,

    section CallTarget+Inlining+NGEN
    This PR (7371) - mean (1,006ms)  : crit, 960, 1052
     .   : crit, milestone, 1006,
    master - mean (932ms)  : 910, 955
     .   : milestone, 932,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7371) - mean (301ms)  : crit, 287, 314
     .   : crit, milestone, 301,
    master - mean (274ms)  : 269, 280
     .   : milestone, 274,

    section Baseline
    This PR (7371) - mean (298ms)  : 285, 311
     .   : milestone, 298,
    master - mean (275ms)  : 268, 281
     .   : milestone, 275,

    section CallTarget+Inlining+NGEN
    This PR (7371) - mean (989ms)  : crit, 933, 1044
     .   : crit, milestone, 989,
    master - mean (914ms)  : 897, 932
     .   : milestone, 914,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7371) - mean (300ms)  : crit, 285, 316
     .   : crit, milestone, 300,
    master - mean (274ms)  : 268, 280
     .   : milestone, 274,

    section Baseline
    This PR (7371) - mean (298ms)  : 282, 314
     .   : milestone, 298,
    master - mean (273ms)  : 267, 279
     .   : milestone, 273,

    section CallTarget+Inlining+NGEN
    This PR (7371) - mean (886ms)  : crit, 816, 955
     .   : crit, milestone, 886,
    master - mean (828ms)  : 812, 844
     .   : milestone, 828,

Loading

@zacharycmontoya
Copy link
Contributor

Can you also update this span tag assertion line so our structured SpanMetadataRules testing enforces that every single span we test for our integrations has a version tag?

@andrewlock
Copy link
Member Author

Can you also update this span tag assertion line so our structured SpanMetadataRules testing enforces that every single span we test for our integrations has a version tag?

Actually, no, because this isn't the case - it's only the case if the customer has set the version 🙂

@andrewlock andrewlock requested review from a team as code owners August 8, 2025 16:30
@pr-commenter
Copy link

pr-commenter bot commented Aug 8, 2025

Benchmarks

Benchmarks Report for benchmark platform 🐌

Benchmarks for #7371 compared to master:

  • 2 benchmarks are slower, with geometric mean 1.679
  • 4 benchmarks have fewer allocations
  • 4 benchmarks have more allocations

The following thresholds were used for comparing the benchmark speeds:

  • Mann–Whitney U test with statistical test for significance of 5%
  • Only results indicating a difference greater than 10% and 0.3 ns are considered.

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.ActivityBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7371

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 6.07 KB 6.1 KB 33 B 0.54%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 10.7μs 59.8ns 369ns 0 0 0 5.5 KB
master StartStopWithChild netcoreapp3.1 13.4μs 72.5ns 377ns 0 0 0 5.71 KB
master StartStopWithChild net472 22.5μs 127ns 896ns 0.891 0.223 0 6.07 KB
#7371 StartStopWithChild net6.0 10.9μs 57.7ns 294ns 0 0 0 5.5 KB
#7371 StartStopWithChild netcoreapp3.1 13.5μs 68.4ns 313ns 0 0 0 5.72 KB
#7371 StartStopWithChild net472 21.9μs 114ns 625ns 0.877 0.329 0 6.1 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 934μs 187ns 673ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 1.04ms 47ns 169ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 1.19ms 93.1ns 360ns 0 0 0 3.31 KB
#7371 WriteAndFlushEnrichedTraces net6.0 944μs 72.5ns 281ns 0 0 0 2.71 KB
#7371 WriteAndFlushEnrichedTraces netcoreapp3.1 1.03ms 199ns 771ns 0 0 0 2.7 KB
#7371 WriteAndFlushEnrichedTraces net472 1.22ms 125ns 466ns 0 0 0 3.31 KB
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 336μs 1.68μs 7.13μs 0 0 0 198.49 KB
master AllCycleSimpleBody netcoreapp3.1 523μs 1.42μs 5.5μs 0 0 0 206.2 KB
master AllCycleSimpleBody net472 459μs 424ns 1.64μs 37.9 2.23 0 246.48 KB
master AllCycleMoreComplexBody net6.0 347μs 613ns 2.37μs 0 0 0 202 KB
master AllCycleMoreComplexBody netcoreapp3.1 506μs 1.13μs 4.39μs 0 0 0 209.62 KB
master AllCycleMoreComplexBody net472 459μs 93.1ns 348ns 37.9 2.23 0 249.99 KB
master ObjectExtractorSimpleBody net6.0 314ns 1.68ns 8.57ns 0 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 402ns 2.19ns 11.6ns 0 0 0 272 B
master ObjectExtractorSimpleBody net472 304ns 0.0281ns 0.109ns 0.0445 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 6.39μs 26.6ns 103ns 0 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 7.88μs 3.85ns 14.4ns 0 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 6.71μs 0.806ns 3.12ns 0.571 0 0 3.8 KB
#7371 AllCycleSimpleBody net6.0 332μs 1.6μs 6.58μs 0 0 0 198.49 KB
#7371 AllCycleSimpleBody netcoreapp3.1 502μs 2.22μs 8.6μs 0 0 0 206.2 KB
#7371 AllCycleSimpleBody net472 454μs 135ns 524ns 37.9 2.23 0 246.48 KB
#7371 AllCycleMoreComplexBody net6.0 343μs 239ns 925ns 0 0 0 202 KB
#7371 AllCycleMoreComplexBody netcoreapp3.1 518μs 795ns 3.08μs 0 0 0 209.62 KB
#7371 AllCycleMoreComplexBody net472 465μs 417ns 1.62μs 39.4 2.31 0 249.99 KB
#7371 ObjectExtractorSimpleBody net6.0 321ns 0.594ns 2.3ns 0 0 0 280 B
#7371 ObjectExtractorSimpleBody netcoreapp3.1 403ns 2.14ns 11.3ns 0 0 0 272 B
#7371 ObjectExtractorSimpleBody net472 302ns 0.0453ns 0.17ns 0.044 0 0 281 B
#7371 ObjectExtractorMoreComplexBody net6.0 6.32μs 29.1ns 113ns 0 0 0 3.78 KB
#7371 ObjectExtractorMoreComplexBody netcoreapp3.1 7.99μs 2.28ns 8.83ns 0 0 0 3.69 KB
#7371 ObjectExtractorMoreComplexBody net472 6.76μs 6.72ns 26ns 0.572 0 0 3.8 KB
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EncodeArgs net6.0 77.4μs 290ns 1.12μs 0 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 97.6μs 223ns 864ns 0 0 0 32.4 KB
master EncodeArgs net472 113μs 30.6ns 118ns 5.08 0 0 32.51 KB
master EncodeLegacyArgs net6.0 145μs 50.7ns 196ns 0 0 0 2.15 KB
master EncodeLegacyArgs netcoreapp3.1 195μs 124ns 480ns 0 0 0 2.14 KB
master EncodeLegacyArgs net472 262μs 18.7ns 64.7ns 0 0 0 2.16 KB
#7371 EncodeArgs net6.0 79.2μs 20.5ns 79.5ns 0 0 0 32.4 KB
#7371 EncodeArgs netcoreapp3.1 97.7μs 88ns 341ns 0 0 0 32.4 KB
#7371 EncodeArgs net472 109μs 23.5ns 91.1ns 4.92 0 0 32.51 KB
#7371 EncodeLegacyArgs net6.0 144μs 85.4ns 331ns 0 0 0 2.14 KB
#7371 EncodeLegacyArgs netcoreapp3.1 197μs 67.3ns 252ns 0 0 0 2.15 KB
#7371 EncodeLegacyArgs net472 262μs 58.3ns 218ns 0 0 0 2.16 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #7371

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 2.460 300,418.37 738,916.84

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWafRealisticBenchmark net6.0 397μs 137ns 511ns 0 0 0 4.55 KB
master RunWafRealisticBenchmark netcoreapp3.1 425μs 412ns 1.43μs 0 0 0 4.48 KB
master RunWafRealisticBenchmark net472 433μs 109ns 422ns 0 0 0 4.66 KB
master RunWafRealisticBenchmarkWithAttack net6.0 287μs 168ns 651ns 0 0 0 2.24 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 301μs 198ns 714ns 0 0 0 2.22 KB
master RunWafRealisticBenchmarkWithAttack net472 312μs 32.5ns 126ns 0 0 0 2.29 KB
#7371 RunWafRealisticBenchmark net6.0 392μs 88.9ns 344ns 0 0 0 4.56 KB
#7371 RunWafRealisticBenchmark netcoreapp3.1 416μs 48.1ns 173ns 0 0 0 4.48 KB
#7371 RunWafRealisticBenchmark net472 432μs 44.5ns 172ns 0 0 0 4.66 KB
#7371 RunWafRealisticBenchmarkWithAttack net6.0 286μs 56.5ns 219ns 0 0 0 2.24 KB
#7371 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 658μs 15.2μs 152μs 0 0 0 2.22 KB
#7371 RunWafRealisticBenchmarkWithAttack net472 314μs 27.6ns 107ns 0 0 0 2.29 KB
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 61.7μs 39.3ns 147ns 0 0 0 14.52 KB
master SendRequest netcoreapp3.1 70.3μs 77ns 298ns 0 0 0 17.42 KB
master SendRequest net472 0.00298ns 0.0013ns 0.00505ns 0 0 0 0 b
#7371 SendRequest net6.0 60.6μs 41.9ns 162ns 0 0 0 14.52 KB
#7371 SendRequest netcoreapp3.1 71.9μs 176ns 633ns 0 0 0 17.42 KB
#7371 SendRequest net472 0.0128ns 0.00328ns 0.0127ns 0 0 0 0 b
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7371

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 2 B 4 B 2 B 100.00%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master OriginalCharSlice net6.0 1.92ms 5.6μs 21.7μs 0 0 0 640.01 KB
master OriginalCharSlice netcoreapp3.1 2.36ms 8.5μs 32.9μs 0 0 0 640 KB
master OriginalCharSlice net472 2.74ms 576ns 2.23μs 100 0 0 641.95 KB
master OptimizedCharSlice net6.0 1.47ms 585ns 2.19μs 0 0 0 2 B
master OptimizedCharSlice netcoreapp3.1 1.69ms 3.76μs 14.5μs 0 0 0 1 B
master OptimizedCharSlice net472 2.05ms 370ns 1.39μs 0 0 0 0 b
master OptimizedCharSliceWithPool net6.0 795μs 38.7ns 145ns 0 0 0 4 B
master OptimizedCharSliceWithPool netcoreapp3.1 804μs 144ns 520ns 0 0 0 0 b
master OptimizedCharSliceWithPool net472 1.14ms 85ns 306ns 0 0 0 0 b
#7371 OriginalCharSlice net6.0 1.91ms 2.67μs 10.4μs 0 0 0 640.01 KB
#7371 OriginalCharSlice netcoreapp3.1 2.2ms 5.88μs 21.2μs 0 0 0 640 KB
#7371 OriginalCharSlice net472 2.71ms 197ns 709ns 100 0 0 641.95 KB
#7371 OptimizedCharSlice net6.0 1.4ms 419ns 1.62μs 0 0 0 4 B
#7371 OptimizedCharSlice netcoreapp3.1 1.79ms 267ns 1.03μs 0 0 0 1 B
#7371 OptimizedCharSlice net472 1.97ms 177ns 661ns 0 0 0 0 b
#7371 OptimizedCharSliceWithPool net6.0 845μs 21ns 78.6ns 0 0 0 4 B
#7371 OptimizedCharSliceWithPool netcoreapp3.1 865μs 41.5ns 161ns 0 0 0 0 b
#7371 OptimizedCharSliceWithPool net472 1.16ms 108ns 404ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 697μs 3.97μs 28.9μs 0 0 0 41.92 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 680μs 3.47μs 15.1μs 0 0 0 41.82 KB
master WriteAndFlushEnrichedTraces net472 824μs 2.37μs 9.17μs 7.81 0 0 55.94 KB
#7371 WriteAndFlushEnrichedTraces net6.0 701μs 3.44μs 14.6μs 0 0 0 41.88 KB
#7371 WriteAndFlushEnrichedTraces netcoreapp3.1 758μs 1.47μs 5.49μs 0 0 0 42.02 KB
#7371 WriteAndFlushEnrichedTraces net472 901μs 3.76μs 14.6μs 8.33 0 0 56.15 KB
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net6.0 1.84μs 0.453ns 1.63ns 0 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 2.64μs 7.58ns 29.3ns 0 0 0 1.02 KB
master ExecuteNonQuery net472 2.76μs 13.8ns 60ns 0.151 0.0137 0 987 B
#7371 ExecuteNonQuery net6.0 2.02μs 9.46ns 36.6ns 0 0 0 1.02 KB
#7371 ExecuteNonQuery netcoreapp3.1 2.6μs 10.7ns 41.5ns 0 0 0 1.02 KB
#7371 ExecuteNonQuery net472 2.73μs 2.19ns 8.19ns 0.15 0.0136 0 987 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.72μs 3.86ns 15ns 0 0 0 1.03 KB
master CallElasticsearch netcoreapp3.1 2.36μs 3.09ns 12ns 0 0 0 1.03 KB
master CallElasticsearch net472 3.55μs 4.09ns 15.8ns 0.159 0 0 1.04 KB
master CallElasticsearchAsync net6.0 1.87μs 7.95ns 30.8ns 0 0 0 1.01 KB
master CallElasticsearchAsync netcoreapp3.1 2.47μs 11.7ns 45.4ns 0 0 0 1.08 KB
master CallElasticsearchAsync net472 3.71μs 4.29ns 16.6ns 0.167 0 0 1.1 KB
#7371 CallElasticsearch net6.0 1.69μs 8.95ns 47.3ns 0 0 0 1.03 KB
#7371 CallElasticsearch netcoreapp3.1 2.38μs 11.4ns 44.1ns 0 0 0 1.03 KB
#7371 CallElasticsearch net472 3.57μs 4.86ns 18.8ns 0.16 0 0 1.04 KB
#7371 CallElasticsearchAsync net6.0 1.82μs 9.16ns 41ns 0 0 0 1.01 KB
#7371 CallElasticsearchAsync netcoreapp3.1 2.43μs 11.8ns 47.4ns 0 0 0 1.08 KB
#7371 CallElasticsearchAsync net472 3.71μs 2.88ns 11.2ns 0.168 0 0 1.1 KB
Benchmarks.Trace.GraphQLBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #7371

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net472 1.146 2,565.07 2,940.31

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.75μs 8.81ns 39.4ns 0 0 0 952 B
master ExecuteAsync netcoreapp3.1 2.33μs 8.4ns 32.5ns 0 0 0 952 B
master ExecuteAsync net472 2.57μs 1.61ns 6.02ns 0.141 0 0 915 B
#7371 ExecuteAsync net6.0 1.91μs 7.44ns 28.8ns 0 0 0 952 B
#7371 ExecuteAsync netcoreapp3.1 2.38μs 9.05ns 35.1ns 0 0 0 952 B
#7371 ExecuteAsync net472 2.94μs 2.75ns 10.3ns 0.132 0 0 915 B
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net6.0 6.79μs 7.63ns 29.5ns 0 0 0 2.36 KB
master SendAsync netcoreapp3.1 8.35μs 15.1ns 56.4ns 0 0 0 2.9 KB
master SendAsync net472 12.2μs 10ns 38.8ns 0.484 0 0 3.18 KB
#7371 SendAsync net6.0 6.63μs 3.4ns 12.7ns 0 0 0 2.36 KB
#7371 SendAsync netcoreapp3.1 8.54μs 24.3ns 90.8ns 0 0 0 2.9 KB
#7371 SendAsync net472 12.2μs 19.6ns 75.7ns 0.488 0 0 3.18 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7371

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 260.5 KB 274.7 KB 14.2 KB 5.45%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 260 KB 272.19 KB 12.19 KB 4.69%

Fewer allocations 🎉 in #7371

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 44.09 KB 43.66 KB -432 B -0.98%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 278.53 KB 274.12 KB -4.41 KB -1.58%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 45.55 KB 42.81 KB -2.74 KB -6.02%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 65.54 KB 57.34 KB -8.19 KB -12.50%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 48.6μs 618ns 6.15μs 0 0 0 44.09 KB
master StringConcatBenchmark netcoreapp3.1 54.7μs 675ns 6.68μs 0 0 0 45.55 KB
master StringConcatBenchmark net472 57.6μs 269ns 1.01μs 0 0 0 65.54 KB
master StringConcatAspectBenchmark net6.0 468μs 1.91μs 6.9μs 0 0 0 260 KB
master StringConcatAspectBenchmark netcoreapp3.1 545μs 2.81μs 12.9μs 0 0 0 260.5 KB
master StringConcatAspectBenchmark net472 404μs 2.16μs 12.2μs 0 0 0 278.53 KB
#7371 StringConcatBenchmark net6.0 46μs 370ns 3.59μs 0 0 0 43.66 KB
#7371 StringConcatBenchmark netcoreapp3.1 50μs 557ns 5.4μs 0 0 0 42.81 KB
#7371 StringConcatBenchmark net472 57.4μs 249ns 897ns 0 0 0 57.34 KB
#7371 StringConcatAspectBenchmark net6.0 466μs 1.99μs 7.19μs 0 0 0 272.19 KB
#7371 StringConcatAspectBenchmark netcoreapp3.1 531μs 2.05μs 7.38μs 0 0 0 274.7 KB
#7371 StringConcatAspectBenchmark net472 404μs 2.22μs 13.5μs 0 0 0 274.12 KB
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.49μs 11.8ns 50ns 0 0 0 1.7 KB
master EnrichedLog netcoreapp3.1 3.51μs 13.5ns 52.3ns 0 0 0 1.7 KB
master EnrichedLog net472 3.93μs 1.58ns 5.9ns 0.255 0 0 1.64 KB
#7371 EnrichedLog net6.0 2.6μs 4.33ns 16.8ns 0 0 0 1.7 KB
#7371 EnrichedLog netcoreapp3.1 3.38μs 17.1ns 84ns 0 0 0 1.7 KB
#7371 EnrichedLog net472 3.88μs 4.78ns 18.5ns 0.252 0 0 1.64 KB
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 122μs 198ns 765ns 0 0 0 4.31 KB
master EnrichedLog netcoreapp3.1 134μs 683ns 3.28μs 0 0 0 4.31 KB
master EnrichedLog net472 174μs 879ns 3.83μs 0 0 0 4.51 KB
#7371 EnrichedLog net6.0 126μs 305ns 1.14μs 0 0 0 4.31 KB
#7371 EnrichedLog netcoreapp3.1 129μs 433ns 1.68μs 0 0 0 4.31 KB
#7371 EnrichedLog net472 172μs 446ns 1.73μs 0 0 0 4.52 KB
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 4.89μs 9.24ns 35.8ns 0 0 0 2.26 KB
master EnrichedLog netcoreapp3.1 6.61μs 7.82ns 30.3ns 0 0 0 2.26 KB
master EnrichedLog net472 7.48μs 6.04ns 22.6ns 0.3 0 0 2.08 KB
#7371 EnrichedLog net6.0 5.03μs 6.41ns 24.8ns 0 0 0 2.26 KB
#7371 EnrichedLog netcoreapp3.1 6.83μs 7.09ns 27.5ns 0 0 0 2.26 KB
#7371 EnrichedLog net472 7.33μs 5.51ns 21.3ns 0.329 0 0 2.08 KB
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net6.0 2.08μs 10.3ns 47.1ns 0 0 0 1.2 KB
master SendReceive netcoreapp3.1 2.68μs 10.3ns 39.8ns 0 0 0 1.2 KB
master SendReceive net472 3.18μs 1.13ns 3.91ns 0.175 0 0 1.2 KB
#7371 SendReceive net6.0 2.04μs 10.7ns 55.6ns 0 0 0 1.2 KB
#7371 SendReceive netcoreapp3.1 2.64μs 7.68ns 29.8ns 0 0 0 1.2 KB
#7371 SendReceive net472 3.16μs 7.21ns 27.9ns 0.191 0 0 1.2 KB
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 4.12μs 9.28ns 33.5ns 0 0 0 1.58 KB
master EnrichedLog netcoreapp3.1 5.55μs 8.9ns 34.5ns 0 0 0 1.63 KB
master EnrichedLog net472 6.73μs 4.84ns 17.5ns 0.304 0 0 2.03 KB
#7371 EnrichedLog net6.0 4.15μs 0.628ns 2.43ns 0 0 0 1.58 KB
#7371 EnrichedLog netcoreapp3.1 5.69μs 15.9ns 59.4ns 0 0 0 1.63 KB
#7371 EnrichedLog net472 6.54μs 10.1ns 39ns 0.296 0 0 2.03 KB
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 762ns 3.8ns 14.7ns 0 0 0 576 B
master StartFinishSpan netcoreapp3.1 921ns 4.98ns 27.7ns 0 0 0 576 B
master StartFinishSpan net472 915ns 0.943ns 3.65ns 0.0877 0 0 578 B
master StartFinishScope net6.0 893ns 0.927ns 3.21ns 0 0 0 696 B
master StartFinishScope netcoreapp3.1 1.15μs 5.8ns 25.9ns 0 0 0 697 B
master StartFinishScope net472 1.12μs 0.542ns 2.1ns 0.101 0 0 658 B
#7371 StartFinishSpan net6.0 739ns 4.02ns 21.3ns 0 0 0 576 B
#7371 StartFinishSpan netcoreapp3.1 960ns 4.81ns 21ns 0 0 0 576 B
#7371 StartFinishSpan net472 904ns 0.735ns 2.85ns 0.0903 0 0 578 B
#7371 StartFinishScope net6.0 905ns 4.74ns 23.7ns 0 0 0 696 B
#7371 StartFinishScope netcoreapp3.1 1.11μs 2.3ns 8.91ns 0 0 0 696 B
#7371 StartFinishScope net472 1.12μs 0.957ns 3.71ns 0.101 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 1.04μs 0.34ns 1.22ns 0 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 1.34μs 5.26ns 20.4ns 0 0 0 696 B
master RunOnMethodBegin net472 1.44μs 2.58ns 9.32ns 0.102 0 0 658 B
#7371 RunOnMethodBegin net6.0 1.09μs 0.883ns 3.42ns 0 0 0 696 B
#7371 RunOnMethodBegin netcoreapp3.1 1.42μs 0.422ns 1.52ns 0 0 0 696 B
#7371 RunOnMethodBegin net472 1.46μs 1.63ns 6.33ns 0.102 0 0 658 B

Copy link
Contributor

@zacharycmontoya zacharycmontoya left a comment

Choose a reason for hiding this comment

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

Looks good!

@andrewlock andrewlock force-pushed the andrew/add-version-to-every-span branch from 8caae49 to def4247 Compare August 11, 2025 13:26
@andrewlock andrewlock requested a review from a team as a code owner August 11, 2025 13:26
Copy link
Contributor

@daniel-romano-DD daniel-romano-DD left a comment

Choose a reason for hiding this comment

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

TY

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants