Skip to content

Conversation

NachoEchevarria
Copy link
Contributor

Summary of changes

Reason for change

Implementation details

Test coverage

Other details

@github-actions github-actions bot added the area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) label Aug 19, 2025
@NachoEchevarria NachoEchevarria changed the title add span tag [NOT FOR MERGING] add span tag Aug 19, 2025
@datadog-datadog-prod-us1
Copy link

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

⚠️ Tests

⚠️ Warnings

🧪 5 Tests failed

AspNetWebApi2TestsCallTargetIntegratedWithRouteTemplateExpansion+AspNetWebApi2TestsModuleOnlyClassic.SubmitsTraces from Datadog.Trace.ClrProfiler.IntegrationTests (Datadog)

Verified path: D:\a\_work\1\s\tracer\test\Datadog.Trace.ClrProfiler.IntegrationTests\..\snapshots\AspNetWebApi2TestsModuleOnly.__path=_handler-api_api-ps=false&ts=true_statusCode=500.verified.txt000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
AspNetWebApi2TestsCallTargetIntegratedWithRouteTemplateExpansion+AspNetWebApi2TestsModuleOnlyClassic.SubmitsTraces from Datadog.Trace.ClrProfiler.IntegrationTests (Datadog)

Verified path: D:\a\_work\1\s\tracer\test\Datadog.Trace.ClrProfiler.IntegrationTests\..\snapshots\AspNetWebApi2TestsModuleOnly.__path=_api_transient-failure_true_statusCode=200.verified.txt000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
AspNetWebApi2TestsCallTargetIntegratedWithRouteTemplateExpansion+AspNetWebApi2TestsModuleOnlyClassic.SubmitsTraces from Datadog.Trace.ClrProfiler.IntegrationTests (Datadog)

Verified path: D:\a\_work\1\s\tracer\test\Datadog.Trace.ClrProfiler.IntegrationTests\..\snapshots\AspNetWebApi2TestsModuleOnly.__path=_api_statuscode_503_statusCode=503.verified.txt00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
View all

ℹ️ Info

❄️ No new flaky tests detected

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

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

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 (7408) - mean (72ms)  : 71, 73
     .   : milestone, 72,
    master - mean (72ms)  : 71, 73
     .   : milestone, 72,

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

    section CallTarget+Inlining+NGEN
    This PR (7408) - mean (1,028ms)  : 997, 1060
     .   : milestone, 1028,
    master - mean (1,000ms)  : 979, 1021
     .   : milestone, 1000,

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

    section Baseline
    This PR (7408) - mean (107ms)  : 104, 110
     .   : milestone, 107,
    master - mean (106ms)  : 103, 109
     .   : milestone, 106,

    section CallTarget+Inlining+NGEN
    This PR (7408) - mean (748ms)  : 738, 758
     .   : milestone, 748,
    master - mean (712ms)  : 698, 726
     .   : milestone, 712,

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

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

    section CallTarget+Inlining+NGEN
    This PR (7408) - mean (694ms)  : 677, 711
     .   : milestone, 694,
    master - mean (670ms)  : 655, 685
     .   : milestone, 670,

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

    section Baseline
    This PR (7408) - mean (93ms)  : 90, 96
     .   : milestone, 93,
    master - mean (93ms)  : 91, 95
     .   : milestone, 93,

    section CallTarget+Inlining+NGEN
    This PR (7408) - mean (628ms)  : 616, 639
     .   : milestone, 628,
    master - mean (603ms)  : 594, 613
     .   : milestone, 603,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7408) - mean (201ms)  : 195, 206
     .   : milestone, 201,
    master - mean (203ms)  : 197, 209
     .   : milestone, 203,

    section Baseline
    This PR (7408) - mean (196ms)  : 191, 202
     .   : milestone, 196,
    master - mean (235ms)  : 229, 242
     .   : milestone, 235,

    section CallTarget+Inlining+NGEN
    This PR (7408) - mean (1,161ms)  : 1124, 1199
     .   : milestone, 1161,
    master - mean (1,131ms)  : 1097, 1165
     .   : milestone, 1131,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7408) - mean (284ms)  : 278, 290
     .   : milestone, 284,
    master - mean (283ms)  : 277, 289
     .   : milestone, 283,

    section Baseline
    This PR (7408) - mean (285ms)  : 279, 291
     .   : milestone, 285,
    master - mean (284ms)  : 274, 295
     .   : milestone, 284,

    section CallTarget+Inlining+NGEN
    This PR (7408) - mean (947ms)  : 912, 982
     .   : milestone, 947,
    master - mean (918ms)  : 893, 942
     .   : milestone, 918,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7408) - mean (280ms)  : 275, 284
     .   : milestone, 280,
    master - mean (272ms)  : 269, 276
     .   : milestone, 272,

    section Baseline
    This PR (7408) - mean (281ms)  : 275, 287
     .   : milestone, 281,
    master - mean (274ms)  : 266, 281
     .   : milestone, 274,

    section CallTarget+Inlining+NGEN
    This PR (7408) - mean (1,039ms)  : crit, 1012, 1066
     .   : crit, milestone, 1039,
    master - mean (898ms)  : 869, 926
     .   : milestone, 898,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7408) - mean (279ms)  : 270, 287
     .   : milestone, 279,
    master - mean (274ms)  : 269, 279
     .   : milestone, 274,

    section Baseline
    This PR (7408) - mean (279ms)  : 273, 286
     .   : milestone, 279,
    master - mean (274ms)  : 268, 280
     .   : milestone, 274,

    section CallTarget+Inlining+NGEN
    This PR (7408) - mean (951ms)  : crit, 922, 980
     .   : crit, milestone, 951,
    master - mean (813ms)  : 785, 841
     .   : milestone, 813,

Loading

@pr-commenter
Copy link

pr-commenter bot commented Aug 19, 2025

Benchmarks

Benchmarks Report for benchmark platform 🐌

Benchmarks for #7408 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.136
  • 55 benchmarks are slower, with geometric mean 36.348
  • 5 benchmarks have fewer allocations
  • 54 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 - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #7408

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net6.0 73.491 10,684.49 785,217.92 bimodal
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑netcoreapp3.1 57.316 13,759.25 788,624.61 bimodal
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 17.992 22,135.35 398,261.79

More allocations ⚠️ in #7408

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net6.0 5.5 KB 2.16 MB 2.15 MB 39,096.89%
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑netcoreapp3.1 5.72 KB 2.16 MB 2.15 MB 37,624.17%
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 6.04 KB 2.17 MB 2.17 MB 35,843.04%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 10.7μs 53.7ns 234ns 0 0 0 5.5 KB
master StartStopWithChild netcoreapp3.1 13.7μs 65.8ns 263ns 0 0 0 5.72 KB
master StartStopWithChild net472 22.2μs 122ns 703ns 0.994 0.331 0.11 6.04 KB
#7408 StartStopWithChild net6.0 790μs 4.6μs 43.9μs 4.17 0 0 2.16 MB
#7408 StartStopWithChild netcoreapp3.1 801μs 4.24μs 22μs 3.91 0 0 2.16 MB
#7408 StartStopWithChild net472 396μs 2.3μs 21.1μs 345 2.02 0 2.17 MB
Benchmarks.Trace.AgentWriterBenchmark - Slower ⚠️ Fewer allocations 🎉

Slower ⚠️ in #7408

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 1.919 1,215,773.86 2,333,339.58
Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 1.416 937,405.80 1,327,362.50
Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 1.413 1,010,194.47 1,427,823.61

Fewer allocations 🎉 in #7408

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 3.35 KB 3.33 KB -23 B -0.69%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 937μs 63.1ns 244ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 1.01ms 74.4ns 268ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 1.21ms 1.27μs 4.75μs 0 0 0 3.35 KB
#7408 WriteAndFlushEnrichedTraces net6.0 1.33ms 265ns 1.03μs 0 0 0 2.71 KB
#7408 WriteAndFlushEnrichedTraces netcoreapp3.1 1.43ms 490ns 1.77μs 0 0 0 2.7 KB
#7408 WriteAndFlushEnrichedTraces net472 2.34ms 4.08μs 15.8μs 0 0 0 3.33 KB
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #7408

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑net6.0 2.295 322,718.45 740,500.74
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody‑net6.0 2.256 331,782.65 748,600.55
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑netcoreapp3.1 1.976 453,515.62 895,922.10
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody‑netcoreapp3.1 1.775 498,876.04 885,521.88
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑net472 1.333 429,062.50 571,820.60
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody‑net472 1.327 440,330.60 584,316.62

More allocations ⚠️ in #7408

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑net6.0 172.08 KB 1.25 MB 1.08 MB 624.90%
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑netcoreapp3.1 174.18 KB 1.25 MB 1.08 MB 617.33%
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody‑net6.0 175.58 KB 1.25 MB 1.08 MB 612.43%
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody‑netcoreapp3.1 177.6 KB 1.25 MB 1.08 MB 605.46%
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑net472 195.47 KB 1.28 MB 1.08 MB 553.89%
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody‑net472 198.98 KB 1.28 MB 1.08 MB 544.12%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 323μs 296ns 1.15μs 0 0 0 172.08 KB
master AllCycleSimpleBody netcoreapp3.1 454μs 771ns 2.98μs 0 0 0 174.18 KB
master AllCycleSimpleBody net472 429μs 128ns 497ns 29.2 0 0 195.47 KB
master AllCycleMoreComplexBody net6.0 331μs 1.14μs 4.4μs 0 0 0 175.58 KB
master AllCycleMoreComplexBody netcoreapp3.1 497μs 1.75μs 6.78μs 0 0 0 177.6 KB
master AllCycleMoreComplexBody net472 440μs 106ns 397ns 30.2 0 0 198.98 KB
master ObjectExtractorSimpleBody net6.0 317ns 1.61ns 7.18ns 0 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 400ns 1.93ns 8.19ns 0 0 0 272 B
master ObjectExtractorSimpleBody net472 300ns 0.116ns 0.447ns 0.0438 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 6.34μs 1.35ns 5.05ns 0 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 7.71μs 30.4ns 118ns 0 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 6.77μs 4.31ns 16.7ns 0.577 0 0 3.8 KB
#7408 AllCycleSimpleBody net6.0 740μs 411ns 1.54μs 0 0 0 1.25 MB
#7408 AllCycleSimpleBody netcoreapp3.1 895μs 667ns 2.58μs 0 0 0 1.25 MB
#7408 AllCycleSimpleBody net472 572μs 262ns 1.02μs 202 2.84 0 1.28 MB
#7408 AllCycleMoreComplexBody net6.0 741μs 4.2μs 29.7μs 0 0 0 1.25 MB
#7408 AllCycleMoreComplexBody netcoreapp3.1 874μs 5.02μs 42μs 0 0 0 1.25 MB
#7408 AllCycleMoreComplexBody net472 584μs 152ns 567ns 202 2.84 0 1.28 MB
#7408 ObjectExtractorSimpleBody net6.0 319ns 1.72ns 8.95ns 0 0 0 280 B
#7408 ObjectExtractorSimpleBody netcoreapp3.1 396ns 2.11ns 11.6ns 0 0 0 272 B
#7408 ObjectExtractorSimpleBody net472 305ns 0.0479ns 0.179ns 0.0445 0 0 281 B
#7408 ObjectExtractorMoreComplexBody net6.0 6.33μs 5ns 19.4ns 0 0 0 3.78 KB
#7408 ObjectExtractorMoreComplexBody netcoreapp3.1 7.77μs 7.12ns 27.6ns 0 0 0 3.69 KB
#7408 ObjectExtractorMoreComplexBody net472 6.75μs 2.17ns 8.11ns 0.573 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 76.5μs 139ns 519ns 0 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 97.1μs 368ns 1.43μs 0 0 0 32.4 KB
master EncodeArgs net472 109μs 33.7ns 126ns 4.92 0 0 32.5 KB
master EncodeLegacyArgs net6.0 141μs 158ns 611ns 0 0 0 2.14 KB
master EncodeLegacyArgs netcoreapp3.1 203μs 32ns 124ns 0 0 0 2.14 KB
master EncodeLegacyArgs net472 262μs 42.3ns 164ns 0 0 0 2.16 KB
#7408 EncodeArgs net6.0 77.4μs 214ns 829ns 0 0 0 32.4 KB
#7408 EncodeArgs netcoreapp3.1 95.8μs 260ns 972ns 0 0 0 32.4 KB
#7408 EncodeArgs net472 109μs 8.26ns 30.9ns 4.9 0 0 32.51 KB
#7408 EncodeLegacyArgs net6.0 144μs 17.3ns 67ns 0 0 0 2.15 KB
#7408 EncodeLegacyArgs netcoreapp3.1 196μs 179ns 692ns 0 0 0 2.14 KB
#7408 EncodeLegacyArgs net472 262μs 38.3ns 143ns 0 0 0 2.16 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWafRealisticBenchmark net6.0 393μs 381ns 1.47μs 0 0 0 4.55 KB
master RunWafRealisticBenchmark netcoreapp3.1 803μs 15.8μs 145μs 0 0 0 4.48 KB
master RunWafRealisticBenchmark net472 430μs 83.9ns 325ns 0 0 0 4.66 KB
master RunWafRealisticBenchmarkWithAttack net6.0 289μs 130ns 503ns 0 0 0 2.24 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 682μs 14.1μs 141μs 0 0 0 2.22 KB
master RunWafRealisticBenchmarkWithAttack net472 311μs 104ns 403ns 0 0 0 2.29 KB
#7408 RunWafRealisticBenchmark net6.0 403μs 86.8ns 325ns 0 0 0 4.56 KB
#7408 RunWafRealisticBenchmark netcoreapp3.1 836μs 8.37μs 80.7μs 0 0 0 4.48 KB
#7408 RunWafRealisticBenchmark net472 432μs 52.5ns 203ns 0 0 0 4.66 KB
#7408 RunWafRealisticBenchmarkWithAttack net6.0 287μs 58.3ns 226ns 0 0 0 2.24 KB
#7408 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 679μs 12.6μs 126μs 0 0 0 2.22 KB
#7408 RunWafRealisticBenchmarkWithAttack net472 316μs 63.6ns 246ns 0 0 0 2.29 KB
Benchmarks.Trace.AspNetCoreBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #7408

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.AspNetCoreBenchmark.SendRequest‑net6.0 5.510 61,124.40 336,787.30
Benchmarks.Trace.AspNetCoreBenchmark.SendRequest‑netcoreapp3.1 4.921 72,151.54 355,032.81

More allocations ⚠️ in #7408

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.AspNetCoreBenchmark.SendRequest‑net6.0 14.52 KB 1.09 MB 1.08 MB 7,405.65%
Benchmarks.Trace.AspNetCoreBenchmark.SendRequest‑netcoreapp3.1 17.42 KB 1.09 MB 1.08 MB 6,174.18%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 61.2μs 66.6ns 240ns 0 0 0 14.52 KB
master SendRequest netcoreapp3.1 72.1μs 59.2ns 221ns 0 0 0 17.42 KB
master SendRequest net472 0.00852ns 0.0034ns 0.0132ns 0 0 0 0 b
#7408 SendRequest net6.0 336μs 605ns 2.26μs 2.02 0 0 1.09 MB
#7408 SendRequest netcoreapp3.1 356μs 718ns 2.78μs 2.08 0 0 1.09 MB
#7408 SendRequest net472 0.00723ns 0.00233ns 0.00904ns 0 0 0 0 b
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7408

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 2 B 3 B 1 B 50.00%

Fewer allocations 🎉 in #7408

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 7 B 2 B -5 B -71.43%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master OriginalCharSlice net6.0 1.92ms 2.95μs 11μs 0 0 0 640.01 KB
master OriginalCharSlice netcoreapp3.1 2.09ms 8.22μs 31.8μs 0 0 0 640 KB
master OriginalCharSlice net472 2.6ms 186ns 719ns 100 0 0 641.95 KB
master OptimizedCharSlice net6.0 1.37ms 606ns 2.19μs 0 0 0 7 B
master OptimizedCharSlice netcoreapp3.1 1.76ms 504ns 1.95μs 0 0 0 1 B
master OptimizedCharSlice net472 2.01ms 303ns 1.17μs 0 0 0 0 b
master OptimizedCharSliceWithPool net6.0 805μs 28.7ns 104ns 0 0 0 2 B
master OptimizedCharSliceWithPool netcoreapp3.1 817μs 48.6ns 188ns 0 0 0 0 b
master OptimizedCharSliceWithPool net472 1.14ms 47.6ns 171ns 0 0 0 0 b
#7408 OriginalCharSlice net6.0 1.93ms 4.96μs 19.2μs 0 0 0 640.01 KB
#7408 OriginalCharSlice netcoreapp3.1 2.07ms 5.06μs 18.9μs 0 0 0 640 KB
#7408 OriginalCharSlice net472 2.66ms 2.93μs 11.3μs 100 0 0 641.95 KB
#7408 OptimizedCharSlice net6.0 1.4ms 212ns 795ns 0 0 0 2 B
#7408 OptimizedCharSlice netcoreapp3.1 1.79ms 566ns 2.12μs 0 0 0 1 B
#7408 OptimizedCharSlice net472 1.94ms 542ns 2.1μs 0 0 0 0 b
#7408 OptimizedCharSliceWithPool net6.0 803μs 32.9ns 123ns 0 0 0 3 B
#7408 OptimizedCharSliceWithPool netcoreapp3.1 900μs 123ns 459ns 0 0 0 0 b
#7408 OptimizedCharSliceWithPool net472 1.15ms 130ns 503ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Slower ⚠️ Fewer allocations 🎉

Slower ⚠️ in #7408

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 1.232 859,003.75 1,058,114.58

Fewer allocations 🎉 in #7408

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 42.45 KB 41.99 KB -455 B -1.07%
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 56.32 KB 54.36 KB -1.96 KB -3.48%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 632μs 540ns 2.02μs 0 0 0 41.76 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 616μs 1.12μs 4.05μs 0 0 0 42.45 KB
master WriteAndFlushEnrichedTraces net472 859μs 2.85μs 10.7μs 8.33 0 0 56.32 KB
#7408 WriteAndFlushEnrichedTraces net6.0 696μs 1.44μs 5.58μs 0 0 0 41.63 KB
#7408 WriteAndFlushEnrichedTraces netcoreapp3.1 688μs 510ns 1.98μs 0 0 0 41.99 KB
#7408 WriteAndFlushEnrichedTraces net472 1.06ms 2.7μs 9.72μs 5.21 0 0 54.36 KB
Benchmarks.Trace.DbCommandBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #7408

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery‑net6.0 185.154 1,864.44 345,208.94 bimodal
Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery‑netcoreapp3.1 140.221 2,658.42 372,765.72
Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery‑net472 47.012 3,011.03 141,554.97

More allocations ⚠️ in #7408

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery‑net472 987 B 1.08 MB 1.08 MB 109,712.46%
Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery‑netcoreapp3.1 1.02 KB 1.08 MB 1.08 MB 105,836.32%
Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery‑net6.0 1.02 KB 1.08 MB 1.08 MB 105,009.67%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net6.0 1.86μs 1.65ns 5.96ns 0 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 2.65μs 8.69ns 31.3ns 0 0 0 1.02 KB
master ExecuteNonQuery net472 3.01μs 4.69ns 17.6ns 0.149 0.0149 0 987 B
#7408 ExecuteNonQuery net6.0 364μs 2.95μs 29.5μs 1.45 0 0 1.08 MB
#7408 ExecuteNonQuery netcoreapp3.1 362μs 2.77μs 25.4μs 1.84 0 0 1.08 MB
#7408 ExecuteNonQuery net472 141μs 114ns 410ns 172 4.97 2.13 1.08 MB
Benchmarks.Trace.ElasticsearchBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #7408

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0 214.733 1,728.57 371,181.53 bimodal
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net6.0 201.833 1,786.15 360,503.84
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑netcoreapp3.1 167.294 2,248.89 376,226.88
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑netcoreapp3.1 153.593 2,443.06 375,237.86
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net472 38.566 3,728.22 143,782.55
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net472 34.681 4,020.53 139,437.67

More allocations ⚠️ in #7408

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net6.0 1.01 KB 1.08 MB 1.08 MB 106,676.59%
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0 1.03 KB 1.08 MB 1.08 MB 104,195.74%
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑netcoreapp3.1 1.03 KB 1.08 MB 1.08 MB 104,195.54%
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net472 1.04 KB 1.08 MB 1.08 MB 103,814.96%
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑netcoreapp3.1 1.08 KB 1.08 MB 1.08 MB 99,564.63%
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net472 1.1 KB 1.08 MB 1.08 MB 98,525.30%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.72μs 7.97ns 31.9ns 0 0 0 1.03 KB
master CallElasticsearch netcoreapp3.1 2.25μs 8.12ns 31.4ns 0 0 0 1.03 KB
master CallElasticsearch net472 3.72μs 5.61ns 21.7ns 0.149 0 0 1.04 KB
master CallElasticsearchAsync net6.0 1.77μs 8.23ns 31.9ns 0 0 0 1.01 KB
master CallElasticsearchAsync netcoreapp3.1 2.45μs 3.19ns 12ns 0 0 0 1.08 KB
master CallElasticsearchAsync net472 4.01μs 6.88ns 24.8ns 0.161 0 0 1.1 KB
#7408 CallElasticsearch net6.0 378μs 2.48μs 24.8μs 1.84 0 0 1.08 MB
#7408 CallElasticsearch netcoreapp3.1 368μs 2.15μs 19.6μs 1.79 0 0 1.08 MB
#7408 CallElasticsearch net472 144μs 15ns 56.1ns 172 2.81 0 1.08 MB
#7408 CallElasticsearchAsync net6.0 361μs 418ns 1.45μs 1.79 0 0 1.08 MB
#7408 CallElasticsearchAsync netcoreapp3.1 367μs 2.34μs 21.4μs 1.79 0 0 1.08 MB
#7408 CallElasticsearchAsync net472 139μs 53.2ns 199ns 172 2.78 0 1.08 MB
Benchmarks.Trace.GraphQLBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #7408

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net6.0 188.668 1,891.86 356,932.94
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑netcoreapp3.1 161.961 2,359.12 382,085.18
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net472 51.213 2,703.14 138,436.79

More allocations ⚠️ in #7408

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net472 915 B 1.08 MB 1.08 MB 118,327.32%
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net6.0 952 B 1.08 MB 1.08 MB 112,951.58%
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑netcoreapp3.1 952 B 1.08 MB 1.08 MB 112,951.26%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.89μs 1.3ns 4.85ns 0 0 0 952 B
master ExecuteAsync netcoreapp3.1 2.36μs 3.69ns 13.3ns 0 0 0 952 B
master ExecuteAsync net472 2.7μs 3.36ns 13ns 0.134 0 0 915 B
#7408 ExecuteAsync net6.0 351μs 2.04μs 17.3μs 1.69 0 0 1.08 MB
#7408 ExecuteAsync netcoreapp3.1 382μs 477ns 1.65μs 2.02 0 0 1.08 MB
#7408 ExecuteAsync net472 138μs 28.6ns 107ns 172 2.04 0 1.08 MB
Benchmarks.Trace.HttpClientBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #7408

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.HttpClientBenchmark.SendAsync‑net6.0 56.359 6,751.40 380,504.23
Benchmarks.Trace.HttpClientBenchmark.SendAsync‑netcoreapp3.1 47.471 8,385.92 398,085.18
Benchmarks.Trace.HttpClientBenchmark.SendAsync‑net472 12.371 12,249.39 151,541.68

More allocations ⚠️ in #7408

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.HttpClientBenchmark.SendAsync‑net6.0 2.36 KB 1.08 MB 1.08 MB 45,563.52%
Benchmarks.Trace.HttpClientBenchmark.SendAsync‑netcoreapp3.1 2.9 KB 1.08 MB 1.08 MB 37,130.39%
Benchmarks.Trace.HttpClientBenchmark.SendAsync‑net472 3.18 KB 1.09 MB 1.08 MB 34,079.04%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net6.0 6.75μs 7.61ns 29.5ns 0 0 0 2.36 KB
master SendAsync netcoreapp3.1 8.38μs 14.7ns 52.9ns 0 0 0 2.9 KB
master SendAsync net472 12.3μs 8.37ns 32.4ns 0.489 0 0 3.18 KB
#7408 SendAsync net6.0 381μs 470ns 1.69μs 2.02 0 0 1.08 MB
#7408 SendAsync netcoreapp3.1 390μs 2.62μs 24.2μs 2.02 0 0 1.08 MB
#7408 SendAsync net472 152μs 34.3ns 128ns 172 3.01 0 1.09 MB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #7408

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 1.197 426,450.00 510,500.00

Faster 🎉 in #7408

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 1.136 48,500.00 42,700.00

More allocations ⚠️ in #7408

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 251.5 KB 275.25 KB 23.75 KB 9.44%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 258.94 KB 276.53 KB 17.59 KB 6.79%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 43.1 KB 43.78 KB 672 B 1.56%

Fewer allocations 🎉 in #7408

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 295.38 KB 278.53 KB -16.85 KB -5.70%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 49.5μs 402ns 3.73μs 0 0 0 43.1 KB
master StringConcatBenchmark netcoreapp3.1 56.2μs 855ns 8.46μs 0 0 0 43.95 KB
master StringConcatBenchmark net472 58.2μs 106ns 384ns 0 0 0 65.54 KB
master StringConcatAspectBenchmark net6.0 456μs 1.53μs 5.51μs 0 0 0 251.5 KB
master StringConcatAspectBenchmark netcoreapp3.1 443μs 4.49μs 43.6μs 0 0 0 258.94 KB
master StringConcatAspectBenchmark net472 407μs 2.07μs 9.01μs 0 0 0 295.38 KB
#7408 StringConcatBenchmark net6.0 42.8μs 227ns 1.16μs 0 0 0 43.78 KB
#7408 StringConcatBenchmark netcoreapp3.1 45.9μs 230ns 974ns 0 0 0 43.78 KB
#7408 StringConcatBenchmark net472 57.1μs 112ns 405ns 0 0 0 65.54 KB
#7408 StringConcatAspectBenchmark net6.0 477μs 1.77μs 6.63μs 0 0 0 275.25 KB
#7408 StringConcatAspectBenchmark netcoreapp3.1 510μs 830ns 2.99μs 0 0 0 276.53 KB
#7408 StringConcatAspectBenchmark net472 400μs 2.03μs 15.3μs 0 0 0 278.53 KB
Benchmarks.Trace.ILoggerBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #7408

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑net6.0 260.249 2,741.03 713,349.31
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑netcoreapp3.1 220.180 3,472.81 764,641.02
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑net472 65.424 4,111.92 269,017.95

More allocations ⚠️ in #7408

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑net472 1.64 KB 2.17 MB 2.17 MB 132,358.62%
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑net6.0 1.7 KB 2.15 MB 2.15 MB 126,208.74%
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑netcoreapp3.1 1.7 KB 2.15 MB 2.15 MB 126,208.45%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.73μs 13.4ns 59.8ns 0 0 0 1.7 KB
master EnrichedLog netcoreapp3.1 3.47μs 3.22ns 12.5ns 0 0 0 1.7 KB
master EnrichedLog net472 4.11μs 3.18ns 12.3ns 0.245 0 0 1.64 KB
#7408 EnrichedLog net6.0 703μs 4.01μs 31.8μs 3.47 0 0 2.15 MB
#7408 EnrichedLog netcoreapp3.1 740μs 6.31μs 56.8μs 3.91 0 0 2.15 MB
#7408 EnrichedLog net472 269μs 55.9ns 202ns 343 6.65 0 2.17 MB
Benchmarks.Trace.Log4netBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #7408

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Log4netBenchmark.EnrichedLog‑netcoreapp3.1 7.552 127,537.72 963,221.15
Benchmarks.Trace.Log4netBenchmark.EnrichedLog‑net6.0 7.056 122,235.11 862,515.62 several?
Benchmarks.Trace.Log4netBenchmark.EnrichedLog‑net472 2.990 166,842.75 498,852.76

More allocations ⚠️ in #7408

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Log4netBenchmark.EnrichedLog‑netcoreapp3.1 4.31 KB 2.15 MB 2.15 MB 49,874.58%
Benchmarks.Trace.Log4netBenchmark.EnrichedLog‑net6.0 4.31 KB 2.15 MB 2.15 MB 49,863.13%
Benchmarks.Trace.Log4netBenchmark.EnrichedLog‑net472 4.52 KB 2.17 MB 2.17 MB 47,916.77%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 122μs 39.6ns 143ns 0 0 0 4.31 KB
master EnrichedLog netcoreapp3.1 128μs 214ns 801ns 0 0 0 4.31 KB
master EnrichedLog net472 167μs 84.3ns 327ns 0 0 0 4.52 KB
#7408 EnrichedLog net6.0 837μs 7.6μs 76μs 3.68 0 0 2.15 MB
#7408 EnrichedLog netcoreapp3.1 960μs 5.29μs 31.7μs 4.81 0 0 2.15 MB
#7408 EnrichedLog net472 499μs 537ns 2.01μs 344 4.81 0 2.17 MB
Benchmarks.Trace.NLogBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #7408

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.NLogBenchmark.EnrichedLog‑net6.0 150.687 4,926.63 742,379.96 bimodal
Benchmarks.Trace.NLogBenchmark.EnrichedLog‑netcoreapp3.1 118.737 6,675.40 792,618.33 several?
Benchmarks.Trace.NLogBenchmark.EnrichedLog‑net472 36.081 7,651.90 276,088.86

More allocations ⚠️ in #7408

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.NLogBenchmark.EnrichedLog‑net472 2.08 KB 2.17 MB 2.17 MB 104,004.90%
Benchmarks.Trace.NLogBenchmark.EnrichedLog‑net6.0 2.26 KB 2.15 MB 2.15 MB 94,991.08%
Benchmarks.Trace.NLogBenchmark.EnrichedLog‑netcoreapp3.1 2.26 KB 2.15 MB 2.15 MB 94,990.81%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 4.9μs 22.9ns 91.5ns 0 0 0 2.26 KB
master EnrichedLog netcoreapp3.1 6.66μs 17.1ns 64ns 0 0 0 2.26 KB
master EnrichedLog net472 7.65μs 5.35ns 20.7ns 0.305 0 0 2.08 KB
#7408 EnrichedLog net6.0 762μs 4.72μs 47.2μs 3.68 0 0 2.15 MB
#7408 EnrichedLog netcoreapp3.1 783μs 6.71μs 66.8μs 4.17 0 0 2.15 MB
#7408 EnrichedLog net472 276μs 27.2ns 102ns 344 6.79 0 2.17 MB
Benchmarks.Trace.RedisBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #7408

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.RedisBenchmark.SendReceive‑net6.0 202.505 1,972.45 399,431.05 several?
Benchmarks.Trace.RedisBenchmark.SendReceive‑netcoreapp3.1 150.155 2,613.45 392,421.25
Benchmarks.Trace.RedisBenchmark.SendReceive‑net472 44.413 3,180.47 141,254.40

More allocations ⚠️ in #7408

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.RedisBenchmark.SendReceive‑net472 1.2 KB 1.08 MB 1.08 MB 89,923.59%
Benchmarks.Trace.RedisBenchmark.SendReceive‑net6.0 1.2 KB 1.08 MB 1.08 MB 89,608.25%
Benchmarks.Trace.RedisBenchmark.SendReceive‑netcoreapp3.1 1.2 KB 1.08 MB 1.08 MB 89,608.00%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net6.0 1.96μs 9.15ns 35.5ns 0 0 0 1.2 KB
master SendReceive netcoreapp3.1 2.62μs 6.78ns 26.3ns 0 0 0 1.2 KB
master SendReceive net472 3.18μs 4ns 15.5ns 0.191 0 0 1.2 KB
#7408 SendReceive net6.0 390μs 2.24μs 18.2μs 1.95 0 0 1.08 MB
#7408 SendReceive netcoreapp3.1 372μs 4.29μs 37.9μs 2.08 0 0 1.08 MB
#7408 SendReceive net472 141μs 25.3ns 91.4ns 172 2.75 0 1.08 MB
Benchmarks.Trace.SerilogBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #7408

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SerilogBenchmark.EnrichedLog‑net6.0 178.484 4,208.84 751,210.55 several?
Benchmarks.Trace.SerilogBenchmark.EnrichedLog‑netcoreapp3.1 132.718 5,458.95 724,499.70
Benchmarks.Trace.SerilogBenchmark.EnrichedLog‑net472 39.797 6,903.77 274,750.82

More allocations ⚠️ in #7408

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.SerilogBenchmark.EnrichedLog‑net6.0 1.58 KB 2.15 MB 2.15 MB 135,770.08%
Benchmarks.Trace.SerilogBenchmark.EnrichedLog‑netcoreapp3.1 1.63 KB 2.15 MB 2.15 MB 131,776.47%
Benchmarks.Trace.SerilogBenchmark.EnrichedLog‑net472 2.03 KB 2.17 MB 2.17 MB 106,878.92%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 4.19μs 11.9ns 44.5ns 0 0 0 1.58 KB
master EnrichedLog netcoreapp3.1 5.45μs 10.6ns 40.9ns 0 0 0 1.63 KB
master EnrichedLog net472 6.9μs 6.59ns 25.5ns 0.31 0 0 2.03 KB
#7408 EnrichedLog net6.0 752μs 5.81μs 58.1μs 3.91 0 0 2.15 MB
#7408 EnrichedLog netcoreapp3.1 730μs 3.35μs 12.5μs 2.98 0 0 2.15 MB
#7408 EnrichedLog net472 275μs 173ns 647ns 344 6.79 0 2.17 MB
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #7408

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 491.381 761.24 374,057.26
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 419.708 879.51 369,138.07
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1 403.222 940.42 379,199.53
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1 308.706 1,165.72 359,863.57
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472 137.489 956.16 131,461.52
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net472 116.694 1,131.18 132,002.43

More allocations ⚠️ in #7408

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472 578 B 1.08 MB 1.08 MB 187,315.57%
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 576 B 1.08 MB 1.08 MB 186,683.85%
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1 576 B 1.08 MB 1.08 MB 186,683.33%
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net472 658 B 1.08 MB 1.08 MB 164,542.25%
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 696 B 1.08 MB 1.08 MB 154,496.98%
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1 696 B 1.08 MB 1.08 MB 154,496.55%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 761ns 0.187ns 0.7ns 0 0 0 576 B
master StartFinishSpan netcoreapp3.1 930ns 4.97ns 26.3ns 0 0 0 576 B
master StartFinishSpan net472 956ns 0.202ns 0.757ns 0.091 0 0 578 B
master StartFinishScope net6.0 880ns 0.604ns 2.34ns 0 0 0 696 B
master StartFinishScope netcoreapp3.1 1.16μs 5.9ns 27ns 0 0 0 696 B
master StartFinishScope net472 1.13μs 0.35ns 1.36ns 0.102 0 0 658 B
#7408 StartFinishSpan net6.0 374μs 303ns 1.09μs 2.02 0 0 1.08 MB
#7408 StartFinishSpan netcoreapp3.1 368μs 2.99μs 26.4μs 1.89 0 0 1.08 MB
#7408 StartFinishSpan net472 131μs 14.3ns 55.2ns 172 2.6 0 1.08 MB
#7408 StartFinishScope net6.0 361μs 2.64μs 23.9μs 1.89 0 0 1.08 MB
#7408 StartFinishScope netcoreapp3.1 357μs 1.9μs 9.51μs 1.52 0 0 1.08 MB
#7408 StartFinishScope net472 132μs 14.4ns 55.8ns 172 1.97 0 1.08 MB
Benchmarks.Trace.TraceAnnotationsBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #7408

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 384.999 1,039.69 400,280.83 bimodal
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑netcoreapp3.1 262.407 1,386.02 363,700.23
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net472 93.355 1,434.20 133,889.36

More allocations ⚠️ in #7408

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net472 658 B 1.08 MB 1.08 MB 164,541.03%
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 696 B 1.08 MB 1.08 MB 154,496.98%
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑netcoreapp3.1 696 B 1.08 MB 1.08 MB 154,496.55%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 1.04μs 1.79ns 6.93ns 0 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 1.37μs 6.95ns 31.9ns 0 0 0 696 B
master RunOnMethodBegin net472 1.43μs 0.582ns 2.25ns 0.1 0 0 658 B
#7408 RunOnMethodBegin net6.0 391μs 2.3μs 22.2μs 2.08 0 0 1.08 MB
#7408 RunOnMethodBegin netcoreapp3.1 358μs 2.05μs 14.8μs 1.52 0 0 1.08 MB
#7408 RunOnMethodBegin net472 134μs 23.8ns 92.2ns 172 1.99 0 1.08 MB

ddyurchenko added a commit that referenced this pull request Aug 22, 2025
## Summary of changes

We need to track GC counts in order to reliably identify the issues with
memory allocations. This PR enables runtime metrics in all
macrobenchmarks, so we have the needed observability.

## Reason for change

This PR is needed to reliably catch memory issues.

## Implementation details

Enables runtime metrics collection by passing env variable
`DD_RUNTIME_METRICS_ENABLED: true`.

# Test

The branch with an artificial issue
(#7408):
<img width="3302" height="650" alt="image"
src="https://github.com/user-attachments/assets/f8087c48-db38-4ee9-bad3-311e1d8c6a6b"
/>

The normal behavior:
<img width="3302" height="650" alt="image"
src="https://github.com/user-attachments/assets/2bbbfc50-663b-481c-b11a-c05a5d7725cf"
/>
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.

1 participant