Skip to content

Conversation

@vandonr
Copy link
Contributor

@vandonr vandonr commented Nov 4, 2025

Summary of changes

  • add a hash of process tags to the base hash of pathway checkpoint hashes
  • write the process tags in DSM payloads(so that the backend can resolve the right service name)

still controlled by the same feature flag as in #7651

This is the dotnet equivalent of DataDog/dd-trace-java#8836

Reason for change

AIDM-195

Implementation details

Test coverage

Other details

@vandonr vandonr requested review from a team as code owners November 4, 2025 16:31
@pr-commenter
Copy link

pr-commenter bot commented Nov 4, 2025

Benchmarks

Benchmarks Report for benchmark platform 🐌

Benchmarks for #7775 compared to master:

  • 6 benchmarks are slower, with geometric mean 1.307
  • 9 benchmarks have fewer allocations
  • 7 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 #7775

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 5.99 KB 6.1 KB 107 B 1.79%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 10.3μs 42.4ns 175ns 0 0 0 5.52 KB
master StartStopWithChild netcoreapp3.1 13.7μs 65.3ns 269ns 0 0 0 5.71 KB
master StartStopWithChild net472 21.9μs 110ns 517ns 1 0.401 0.1 5.99 KB
#7775 StartStopWithChild net6.0 10.8μs 58.2ns 319ns 0 0 0 5.51 KB
#7775 StartStopWithChild netcoreapp3.1 13.7μs 42.9ns 166ns 0 0 0 5.7 KB
#7775 StartStopWithChild net472 22.1μs 120ns 702ns 0.871 0.218 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 953μs 425ns 1.59μs 0 0 0 2.71 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 1.05ms 926ns 3.34μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 1.24ms 505ns 1.96μs 0 0 0 3.31 KB
#7775 WriteAndFlushEnrichedTraces net6.0 928μs 82.9ns 287ns 0 0 0 2.71 KB
#7775 WriteAndFlushEnrichedTraces netcoreapp3.1 1.03ms 81.6ns 283ns 0 0 0 2.7 KB
#7775 WriteAndFlushEnrichedTraces net472 1.21ms 26.3ns 98.4ns 0 0 0 3.31 KB
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Unknown 🤷 Fewer allocations 🎉

Fewer allocations 🎉 in #7775

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑net6.0 1.22 KB 0 b -1.22 KB -100.00%
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑netcoreapp3.1 1.2 KB 0 b -1.2 KB -100.00%
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody‑net472 1.23 KB 0 b -1.23 KB -100.00%
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody‑net6.0 4.72 KB 0 b -4.72 KB -100.00%
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody‑netcoreapp3.1 4.62 KB 0 b -4.62 KB -100.00%
Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody‑net472 4.74 KB 0 b -4.74 KB -100.00%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 1.07μs 5.79ns 32.3ns 0 0 0 1.22 KB
master AllCycleSimpleBody netcoreapp3.1 1.41μs 7.44ns 38.7ns 0 0 0 1.2 KB
master AllCycleSimpleBody net472 1.03μs 0.428ns 1.66ns 0.191 0 0 1.23 KB
master AllCycleMoreComplexBody net6.0 7μs 35.3ns 150ns 0 0 0 4.72 KB
master AllCycleMoreComplexBody netcoreapp3.1 8.92μs 33.7ns 131ns 0 0 0 4.62 KB
master AllCycleMoreComplexBody net472 7.65μs 7.71ns 29.9ns 0.729 0 0 4.74 KB
master ObjectExtractorSimpleBody net6.0 319ns 0.0645ns 0.25ns 0 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 398ns 1.93ns 7.96ns 0 0 0 272 B
master ObjectExtractorSimpleBody net472 295ns 0.0671ns 0.26ns 0.0432 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 6.39μs 19.8ns 76.7ns 0 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 7.81μs 38.8ns 165ns 0 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 6.72μs 2.45ns 9.48ns 0.601 0 0 3.8 KB
#7775 AllCycleSimpleBody net6.0 N/A N/A N/A NaN NaN NaN 0 b
#7775 AllCycleSimpleBody netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
#7775 AllCycleSimpleBody net472 N/A N/A N/A NaN NaN NaN 0 b
#7775 AllCycleMoreComplexBody net6.0 N/A N/A N/A NaN NaN NaN 0 b
#7775 AllCycleMoreComplexBody netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
#7775 AllCycleMoreComplexBody net472 N/A N/A N/A NaN NaN NaN 0 b
#7775 ObjectExtractorSimpleBody net6.0 317ns 1.78ns 11.1ns 0 0 0 280 B
#7775 ObjectExtractorSimpleBody netcoreapp3.1 401ns 2.2ns 12.5ns 0 0 0 272 B
#7775 ObjectExtractorSimpleBody net472 296ns 0.0471ns 0.182ns 0.0432 0 0 281 B
#7775 ObjectExtractorMoreComplexBody net6.0 6.33μs 4.12ns 16ns 0 0 0 3.78 KB
#7775 ObjectExtractorMoreComplexBody netcoreapp3.1 7.85μs 36.2ns 140ns 0 0 0 3.69 KB
#7775 ObjectExtractorMoreComplexBody net472 6.7μs 2.19ns 8.21ns 0.57 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μs 20.4ns 76.4ns 0 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 96.7μs 248ns 961ns 0 0 0 32.4 KB
master EncodeArgs net472 113μs 6.99ns 26.2ns 5.07 0 0 32.51 KB
master EncodeLegacyArgs net6.0 146μs 197ns 765ns 0 0 0 2.15 KB
master EncodeLegacyArgs netcoreapp3.1 197μs 77ns 288ns 0 0 0 2.14 KB
master EncodeLegacyArgs net472 263μs 125ns 484ns 0 0 0 2.16 KB
#7775 EncodeArgs net6.0 76.2μs 223ns 863ns 0 0 0 32.4 KB
#7775 EncodeArgs netcoreapp3.1 96.4μs 338ns 1.31μs 0 0 0 32.4 KB
#7775 EncodeArgs net472 112μs 14ns 52.4ns 5.03 0 0 32.51 KB
#7775 EncodeLegacyArgs net6.0 145μs 35.6ns 138ns 0 0 0 2.15 KB
#7775 EncodeLegacyArgs netcoreapp3.1 198μs 254ns 984ns 0 0 0 2.14 KB
#7775 EncodeLegacyArgs net472 264μs 17.3ns 67ns 0 0 0 2.17 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #7775

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 2.491 294,986.01 734,881.47

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWafRealisticBenchmark net6.0 417μs 63.4ns 237ns 0 0 0 4.55 KB
master RunWafRealisticBenchmark netcoreapp3.1 411μs 90.8ns 315ns 0 0 0 4.48 KB
master RunWafRealisticBenchmark net472 441μs 85.1ns 319ns 0 0 0 4.66 KB
master RunWafRealisticBenchmarkWithAttack net6.0 291μs 79.9ns 288ns 0 0 0 2.24 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 295μs 83ns 299ns 0 0 0 2.22 KB
master RunWafRealisticBenchmarkWithAttack net472 317μs 40.2ns 156ns 0 0 0 2.29 KB
#7775 RunWafRealisticBenchmark net6.0 392μs 81.7ns 283ns 0 0 0 4.56 KB
#7775 RunWafRealisticBenchmark netcoreapp3.1 412μs 863ns 3.34μs 0 0 0 4.48 KB
#7775 RunWafRealisticBenchmark net472 427μs 57.5ns 223ns 0 0 0 4.66 KB
#7775 RunWafRealisticBenchmarkWithAttack net6.0 284μs 28.5ns 107ns 0 0 0 2.24 KB
#7775 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 660μs 14.3μs 143μs 0 0 0 2.22 KB
#7775 RunWafRealisticBenchmarkWithAttack net472 309μs 34.1ns 123ns 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.6μs 27.2ns 106ns 0 0 0 14.52 KB
master SendRequest netcoreapp3.1 71.6μs 101ns 379ns 0 0 0 17.42 KB
master SendRequest net472 0.00136ns 0.000796ns 0.00298ns 0 0 0 0 b
#7775 SendRequest net6.0 61.8μs 177ns 685ns 0 0 0 14.52 KB
#7775 SendRequest netcoreapp3.1 70.5μs 64.4ns 241ns 0 0 0 17.42 KB
#7775 SendRequest net472 0.0145ns 0.00355ns 0.0137ns 0 0 0 0 b
Benchmarks.Trace.CharSliceBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #7775

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 1.173 1,388,293.75 1,628,575.00
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 1.142 807,964.29 922,738.75

More allocations ⚠️ in #7775

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472 0 b 73 B 73 B
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472 0 b 47 B 47 B
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 3 B 4 B 1 B 33.33%

Fewer allocations 🎉 in #7775

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 7 B 4 B -3 B -42.86%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 1 B 0 b -1 B -100.00%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master OriginalCharSlice net6.0 1.92ms 1.96μs 7.35μs 0 0 0 640.01 KB
master OriginalCharSlice netcoreapp3.1 2.21ms 6.9μs 25.8μs 0 0 0 640 KB
master OriginalCharSlice net472 2.55ms 80.9ns 303ns 100 0 0 641.95 KB
master OptimizedCharSlice net6.0 1.39ms 182ns 705ns 0 0 0 7 B
master OptimizedCharSlice netcoreapp3.1 1.68ms 1.67μs 6.45μs 0 0 0 1 B
master OptimizedCharSlice net472 2.01ms 283ns 1.1μs 0 0 0 0 b
master OptimizedCharSliceWithPool net6.0 857μs 101ns 393ns 0 0 0 3 B
master OptimizedCharSliceWithPool netcoreapp3.1 808μs 62.5ns 242ns 0 0 0 1 B
master OptimizedCharSliceWithPool net472 1.13ms 91.4ns 354ns 0 0 0 0 b
#7775 OriginalCharSlice net6.0 1.91ms 964ns 3.73μs 0 0 0 640.01 KB
#7775 OriginalCharSlice netcoreapp3.1 2.13ms 3.4μs 13.2μs 0 0 0 640 KB
#7775 OriginalCharSlice net472 2.75ms 266ns 1.03μs 100 0 0 641.95 KB
#7775 OptimizedCharSlice net6.0 1.63ms 277ns 1.07μs 0 0 0 4 B
#7775 OptimizedCharSlice netcoreapp3.1 1.66ms 302ns 1.17μs 0 0 0 1 B
#7775 OptimizedCharSlice net472 2.04ms 222ns 829ns 0 0 0 73 B
#7775 OptimizedCharSliceWithPool net6.0 945μs 79ns 306ns 0 0 0 4 B
#7775 OptimizedCharSliceWithPool netcoreapp3.1 923μs 77.4ns 300ns 0 0 0 0 b
#7775 OptimizedCharSliceWithPool net472 1.13ms 99.7ns 386ns 0 0 0 47 B
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #7775

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 1.160 866,499.79 1,005,447.12
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 1.136 697,693.33 792,532.14 bimodal

More allocations ⚠️ in #7775

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 41.84 KB 42.81 KB 971 B 2.32%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 680μs 1.96μs 7.31μs 0 0 0 41.61 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 696μs 1.49μs 5.15μs 0 0 0 41.84 KB
master WriteAndFlushEnrichedTraces net472 869μs 2.97μs 11.5μs 8.33 0 0 56.49 KB
#7775 WriteAndFlushEnrichedTraces net6.0 640μs 3.38μs 18.5μs 0 0 0 41.77 KB
#7775 WriteAndFlushEnrichedTraces netcoreapp3.1 803μs 4.67μs 42.3μs 0 0 0 42.81 KB
#7775 WriteAndFlushEnrichedTraces net472 1.01ms 4.6μs 17.2μs 4.81 0 0 56.23 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.91μs 4.03ns 15.6ns 0 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 2.66μs 9.81ns 38ns 0 0 0 1.02 KB
master ExecuteNonQuery net472 2.9μs 3.07ns 11.9ns 0.145 0.0145 0 987 B
#7775 ExecuteNonQuery net6.0 1.95μs 1.21ns 4.69ns 0 0 0 1.02 KB
#7775 ExecuteNonQuery netcoreapp3.1 2.63μs 9.8ns 37.9ns 0 0 0 1.02 KB
#7775 ExecuteNonQuery net472 2.85μs 3.46ns 13.4ns 0.144 0.0144 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.74μs 8.1ns 31.4ns 0 0 0 1.03 KB
master CallElasticsearch netcoreapp3.1 2.2μs 10.5ns 44.4ns 0 0 0 1.03 KB
master CallElasticsearch net472 3.6μs 3ns 11.6ns 0.162 0 0 1.04 KB
master CallElasticsearchAsync net6.0 1.84μs 8.73ns 33.8ns 0 0 0 1.01 KB
master CallElasticsearchAsync netcoreapp3.1 2.4μs 11.6ns 46.4ns 0 0 0 1.08 KB
master CallElasticsearchAsync net472 3.67μs 4.86ns 18.8ns 0.165 0 0 1.1 KB
#7775 CallElasticsearch net6.0 1.67μs 8.04ns 31.1ns 0 0 0 1.03 KB
#7775 CallElasticsearch netcoreapp3.1 2.25μs 3.6ns 13.9ns 0 0 0 1.03 KB
#7775 CallElasticsearch net472 3.55μs 1.24ns 4.79ns 0.16 0 0 1.04 KB
#7775 CallElasticsearchAsync net6.0 1.92μs 1.87ns 7.23ns 0 0 0 1.01 KB
#7775 CallElasticsearchAsync netcoreapp3.1 2.38μs 8.12ns 31.4ns 0 0 0 1.08 KB
#7775 CallElasticsearchAsync net472 3.63μs 1.79ns 6.68ns 0.163 0 0 1.1 KB
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.84μs 9.26ns 40.3ns 0 0 0 952 B
master ExecuteAsync netcoreapp3.1 2.43μs 11.3ns 45.2ns 0 0 0 952 B
master ExecuteAsync net472 2.54μs 3.55ns 13.8ns 0.14 0 0 915 B
#7775 ExecuteAsync net6.0 1.93μs 4.43ns 17.2ns 0 0 0 952 B
#7775 ExecuteAsync netcoreapp3.1 2.45μs 7.55ns 29.2ns 0 0 0 952 B
#7775 ExecuteAsync net472 2.6μs 1.87ns 7.25ns 0.143 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 7.08μs 8.57ns 33.2ns 0 0 0 2.36 KB
master SendAsync netcoreapp3.1 8.87μs 33.1ns 128ns 0 0 0 2.9 KB
master SendAsync net472 12.3μs 8.57ns 32.1ns 0.493 0 0 3.18 KB
#7775 SendAsync net6.0 6.78μs 5.97ns 22.3ns 0 0 0 2.36 KB
#7775 SendAsync netcoreapp3.1 8.61μs 24.5ns 95ns 0 0 0 2.9 KB
#7775 SendAsync net472 12.5μs 10.3ns 40.1ns 0.498 0 0 3.18 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #7775

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 1.132 41,600.00 47,100.00

More allocations ⚠️ in #7775

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 43.59 KB 43.93 KB 336 B 0.77%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 255.14 KB 256.61 KB 1.47 KB 0.58%

Fewer allocations 🎉 in #7775

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 45.5 KB 42.73 KB -2.78 KB -6.10%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 41.7μs 160ns 578ns 0 0 0 43.59 KB
master StringConcatBenchmark netcoreapp3.1 54.9μs 944ns 9.39μs 0 0 0 45.5 KB
master StringConcatBenchmark net472 57.6μs 91.6ns 330ns 0 0 0 65.54 KB
master StringConcatAspectBenchmark net6.0 474μs 1.52μs 5.28μs 0 0 0 278.42 KB
master StringConcatAspectBenchmark netcoreapp3.1 488μs 2.49μs 10.8μs 0 0 0 255.14 KB
master StringConcatAspectBenchmark net472 409μs 2.31μs 15.5μs 0 0 0 278.53 KB
#7775 StringConcatBenchmark net6.0 48μs 285ns 2.62μs 0 0 0 43.93 KB
#7775 StringConcatBenchmark netcoreapp3.1 47.3μs 268ns 1.95μs 0 0 0 42.73 KB
#7775 StringConcatBenchmark net472 56.8μs 260ns 974ns 0 0 0 65.54 KB
#7775 StringConcatAspectBenchmark net6.0 480μs 798ns 2.76μs 0 0 0 277.18 KB
#7775 StringConcatAspectBenchmark netcoreapp3.1 521μs 2.38μs 9.53μs 0 0 0 256.61 KB
#7775 StringConcatAspectBenchmark net472 406μs 2.33μs 18.4μs 0 0 0 278.53 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.61μs 14ns 72.6ns 0 0 0 1.7 KB
master EnrichedLog netcoreapp3.1 3.69μs 17.6ns 70.4ns 0 0 0 1.7 KB
master EnrichedLog net472 4.01μs 9.66ns 37.4ns 0.242 0 0 1.64 KB
#7775 EnrichedLog net6.0 2.71μs 2.06ns 7.44ns 0 0 0 1.7 KB
#7775 EnrichedLog netcoreapp3.1 3.62μs 18.2ns 81.3ns 0 0 0 1.7 KB
#7775 EnrichedLog net472 3.81μs 2.98ns 11.5ns 0.247 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 97.1ns 350ns 0 0 0 4.31 KB
master EnrichedLog netcoreapp3.1 129μs 392ns 1.52μs 0 0 0 4.31 KB
master EnrichedLog net472 167μs 62ns 232ns 0 0 0 4.51 KB
#7775 EnrichedLog net6.0 124μs 60.8ns 211ns 0 0 0 4.31 KB
#7775 EnrichedLog netcoreapp3.1 131μs 690ns 3.72μs 0 0 0 4.31 KB
#7775 EnrichedLog net472 168μs 168ns 653ns 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 5μs 16ns 61.9ns 0 0 0 2.26 KB
master EnrichedLog netcoreapp3.1 6.84μs 12.2ns 45.5ns 0 0 0 2.26 KB
master EnrichedLog net472 7.52μs 6.02ns 22.5ns 0.302 0 0 2.08 KB
#7775 EnrichedLog net6.0 5.25μs 25.1ns 103ns 0 0 0 2.26 KB
#7775 EnrichedLog netcoreapp3.1 7.25μs 6.49ns 24.3ns 0 0 0 2.26 KB
#7775 EnrichedLog net472 7.63μs 6.55ns 25.4ns 0.306 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.02μs 9.72ns 37.6ns 0 0 0 1.2 KB
master SendReceive netcoreapp3.1 2.61μs 13.1ns 58.5ns 0 0 0 1.2 KB
master SendReceive net472 3.09μs 2.48ns 9.61ns 0.185 0 0 1.2 KB
#7775 SendReceive net6.0 1.98μs 9.58ns 37.1ns 0 0 0 1.2 KB
#7775 SendReceive netcoreapp3.1 2.58μs 12.5ns 51.7ns 0 0 0 1.2 KB
#7775 SendReceive net472 3.23μs 6.92ns 26.8ns 0.178 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.09μs 17.4ns 67.5ns 0 0 0 1.58 KB
master EnrichedLog netcoreapp3.1 5.8μs 11.4ns 44.2ns 0 0 0 1.63 KB
master EnrichedLog net472 6.73μs 9.84ns 38.1ns 0.303 0 0 2.03 KB
#7775 EnrichedLog net6.0 4.15μs 12.4ns 44.7ns 0 0 0 1.58 KB
#7775 EnrichedLog netcoreapp3.1 5.6μs 4.91ns 19ns 0 0 0 1.63 KB
#7775 EnrichedLog net472 6.61μs 9.54ns 36.9ns 0.297 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 764ns 3.95ns 18.5ns 0 0 0 576 B
master StartFinishSpan netcoreapp3.1 959ns 4.95ns 23.2ns 0 0 0 576 B
master StartFinishSpan net472 927ns 0.386ns 1.5ns 0.0885 0 0 578 B
master StartFinishScope net6.0 905ns 4.85ns 26.1ns 0 0 0 696 B
master StartFinishScope netcoreapp3.1 1.19μs 2.53ns 9.8ns 0 0 0 696 B
master StartFinishScope net472 1.12μs 0.538ns 2.01ns 0.102 0 0 658 B
#7775 StartFinishSpan net6.0 781ns 0.231ns 0.865ns 0 0 0 576 B
#7775 StartFinishSpan netcoreapp3.1 978ns 0.656ns 2.54ns 0 0 0 576 B
#7775 StartFinishSpan net472 912ns 0.319ns 1.15ns 0.0876 0 0 578 B
#7775 StartFinishScope net6.0 921ns 3.33ns 12.5ns 0 0 0 696 B
#7775 StartFinishScope netcoreapp3.1 1.21μs 6.3ns 32.7ns 0 0 0 696 B
#7775 StartFinishScope net472 1.13μs 1.14ns 4.41ns 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.08μs 5.76ns 28.8ns 0 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 1.47μs 7.42ns 32.3ns 0 0 0 696 B
master RunOnMethodBegin net472 1.46μs 0.673ns 2.61ns 0.102 0 0 658 B
#7775 RunOnMethodBegin net6.0 1.04μs 5.64ns 29.8ns 0 0 0 696 B
#7775 RunOnMethodBegin netcoreapp3.1 1.41μs 6.76ns 27ns 0 0 0 696 B
#7775 RunOnMethodBegin net472 1.54μs 3.43ns 12.8ns 0.1 0 0 658 B

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

dd-trace-dotnet-ci-bot bot commented Nov 4, 2025

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (7775) 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
duration68.18 ± (68.19 - 68.45) ms67.93 ± (67.93 - 68.21) ms-0.4%
.NET Framework 4.8 - Bailout
duration71.96 ± (71.83 - 72.08) ms71.76 ± (71.67 - 71.91) ms-0.3%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1042.85 ± (1044.00 - 1049.22) ms1040.81 ± (1046.84 - 1055.21) ms-0.2%
.NET Core 3.1 - Baseline
process.internal_duration_ms22.04 ± (22.00 - 22.08) ms21.82 ± (21.80 - 21.85) ms-1.0%
process.time_to_main_ms79.05 ± (78.89 - 79.21) ms78.66 ± (78.52 - 78.81) ms-0.5%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.94 ± (10.93 - 10.94) MB10.89 ± (10.88 - 10.89) MB-0.4%
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms21.90 ± (21.87 - 21.92) ms21.78 ± (21.76 - 21.81) ms-0.5%
process.time_to_main_ms80.20 ± (80.11 - 80.29) ms79.99 ± (79.89 - 80.08) ms-0.3%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.96 ± (10.95 - 10.96) MB10.93 ± (10.93 - 10.93) MB-0.2%
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms209.64 ± (208.34 - 210.93) ms209.09 ± (207.63 - 210.55) ms-0.3%
process.time_to_main_ms513.71 ± (513.19 - 514.23) ms511.73 ± (511.18 - 512.27) ms-0.4%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed52.64 ± (52.62 - 52.66) MB52.42 ± (52.39 - 52.44) MB-0.4%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%
.NET 6 - Baseline
process.internal_duration_ms20.78 ± (20.75 - 20.81) ms20.75 ± (20.72 - 20.78) ms-0.2%
process.time_to_main_ms68.50 ± (68.38 - 68.62) ms67.92 ± (67.80 - 68.05) ms-0.8%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.60 ± (10.60 - 10.61) MB10.58 ± (10.58 - 10.58) MB-0.2%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms20.79 ± (20.76 - 20.81) ms20.74 ± (20.70 - 20.77) ms-0.3%
process.time_to_main_ms69.53 ± (69.45 - 69.60) ms69.19 ± (69.11 - 69.27) ms-0.5%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.64 ± (10.63 - 10.64) MB10.63 ± (10.62 - 10.63) MB-0.1%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms199.26 ± (196.98 - 201.55) ms197.42 ± (195.72 - 199.13) ms-0.9%
process.time_to_main_ms483.49 ± (482.91 - 484.06) ms476.27 ± (475.78 - 476.76) ms-1.5%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed51.60 ± (51.53 - 51.66) MB51.15 ± (51.08 - 51.22) MB-0.9%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.1%
.NET 8 - Baseline
process.internal_duration_ms18.97 ± (18.94 - 19.00) ms18.90 ± (18.86 - 18.93) ms-0.4%
process.time_to_main_ms67.53 ± (67.42 - 67.64) ms67.04 ± (66.92 - 67.16) ms-0.7%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.66 ± (7.66 - 7.67) MB7.62 ± (7.61 - 7.62) MB-0.6%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms18.95 ± (18.92 - 18.98) ms18.83 ± (18.80 - 18.86) ms-0.6%
process.time_to_main_ms68.51 ± (68.44 - 68.58) ms68.03 ± (67.97 - 68.08) ms-0.7%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.70 ± (7.70 - 7.71) MB7.67 ± (7.66 - 7.67) MB-0.5%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms177.42 ± (176.49 - 178.34) ms177.07 ± (176.23 - 177.90) ms-0.2%
process.time_to_main_ms458.64 ± (458.17 - 459.10) ms452.63 ± (452.04 - 453.23) ms-1.3%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed38.74 ± (38.71 - 38.76) MB38.54 ± (38.51 - 38.57) MB-0.5%
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)-0.0%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration192.37 ± (192.36 - 193.23) ms191.58 ± (191.74 - 192.53) ms-0.4%
.NET Framework 4.8 - Bailout
duration195.65 ± (195.54 - 196.06) ms196.24 ± (196.30 - 197.18) ms+0.3%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1160.64 ± (1167.14 - 1177.47) ms1156.18 ± (1159.52 - 1168.27) ms-0.4%
.NET Core 3.1 - Baseline
process.internal_duration_ms187.77 ± (187.46 - 188.08) ms187.03 ± (186.71 - 187.34) ms-0.4%
process.time_to_main_ms81.15 ± (80.89 - 81.40) ms80.49 ± (80.28 - 80.70) ms-0.8%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.09 ± (16.07 - 16.12) MB16.03 ± (16.01 - 16.06) MB-0.4%
runtime.dotnet.threads.count20 ± (19 - 20)20 ± (19 - 20)+0.1%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms187.16 ± (186.79 - 187.52) ms186.50 ± (186.22 - 186.79) ms-0.3%
process.time_to_main_ms82.20 ± (82.02 - 82.39) ms81.62 ± (81.47 - 81.76) ms-0.7%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.17 ± (16.14 - 16.20) MB16.10 ± (16.08 - 16.12) MB-0.4%
runtime.dotnet.threads.count21 ± (20 - 21)21 ± (20 - 21)+0.3%✅⬆️
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms394.45 ± (392.01 - 396.90) ms393.99 ± (391.54 - 396.45) ms-0.1%
process.time_to_main_ms517.10 ± (516.48 - 517.72) ms512.90 ± (512.28 - 513.52) ms-0.8%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed63.13 ± (62.98 - 63.28) MB62.61 ± (62.46 - 62.77) MB-0.8%
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)-0.1%
.NET 6 - Baseline
process.internal_duration_ms192.10 ± (191.74 - 192.46) ms190.73 ± (190.37 - 191.08) ms-0.7%
process.time_to_main_ms70.20 ± (70.01 - 70.38) ms69.34 ± (69.16 - 69.53) ms-1.2%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.16 ± (16.04 - 16.28) MB15.96 ± (15.79 - 16.12) MB-1.3%
runtime.dotnet.threads.count19 ± (19 - 19)18 ± (18 - 18)-3.6%
.NET 6 - Bailout
process.internal_duration_ms190.71 ± (190.42 - 191.00) ms190.27 ± (190.01 - 190.53) ms-0.2%
process.time_to_main_ms70.74 ± (70.63 - 70.85) ms70.25 ± (70.13 - 70.37) ms-0.7%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.03 ± (15.88 - 16.18) MB16.08 ± (15.93 - 16.23) MB+0.3%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms409.80 ± (406.92 - 412.67) ms408.33 ± (405.07 - 411.59) ms-0.4%
process.time_to_main_ms487.42 ± (486.86 - 487.98) ms479.99 ± (479.39 - 480.59) ms-1.5%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed62.40 ± (62.27 - 62.54) MB61.77 ± (61.63 - 61.92) MB-1.0%
runtime.dotnet.threads.count29 ± (29 - 30)29 ± (29 - 29)-0.0%
.NET 8 - Baseline
process.internal_duration_ms189.36 ± (189.03 - 189.69) ms189.24 ± (188.88 - 189.61) ms-0.1%
process.time_to_main_ms69.26 ± (69.10 - 69.43) ms68.98 ± (68.80 - 69.16) ms-0.4%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.81 ± (11.78 - 11.83) MB11.71 ± (11.68 - 11.73) MB-0.8%
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)-0.5%
.NET 8 - Bailout
process.internal_duration_ms188.42 ± (188.14 - 188.70) ms187.75 ± (187.51 - 187.98) ms-0.4%
process.time_to_main_ms70.29 ± (70.21 - 70.38) ms69.75 ± (69.66 - 69.84) ms-0.8%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.89 ± (11.84 - 11.94) MB11.78 ± (11.74 - 11.82) MB-0.9%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.1%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms360.10 ± (358.56 - 361.63) ms358.97 ± (357.41 - 360.52) ms-0.3%
process.time_to_main_ms465.13 ± (464.41 - 465.85) ms455.96 ± (455.37 - 456.55) ms-2.0%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.32 ± (50.27 - 50.36) MB50.30 ± (50.26 - 50.33) MB-0.0%
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)+0.5%✅⬆️
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 (7775) - mean (68ms)  : 67, 69
    master - mean (68ms)  : 67, 70

    section Bailout
    This PR (7775) - mean (72ms)  : 71, 73
    master - mean (72ms)  : 71, 73

    section CallTarget+Inlining+NGEN
    This PR (7775) - mean (1,051ms)  : 991, 1111
    master - mean (1,047ms)  : 1010, 1083

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 (7775) - mean (106ms)  : 103, 108
    master - mean (107ms)  : 104, 109

    section Bailout
    This PR (7775) - mean (107ms)  : 106, 108
    master - mean (107ms)  : 106, 109

    section CallTarget+Inlining+NGEN
    This PR (7775) - mean (749ms)  : 714, 785
    master - mean (759ms)  : 727, 790

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7775) - mean (94ms)  : 91, 96
    master - mean (94ms)  : 91, 97

    section Bailout
    This PR (7775) - mean (95ms)  : 93, 96
    master - mean (95ms)  : 94, 96

    section CallTarget+Inlining+NGEN
    This PR (7775) - mean (701ms)  : 672, 731
    master - mean (711ms)  : 674, 748

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7775) - mean (92ms)  : 90, 95
    master - mean (93ms)  : 91, 95

    section Bailout
    This PR (7775) - mean (93ms)  : 92, 94
    master - mean (93ms)  : 92, 95

    section CallTarget+Inlining+NGEN
    This PR (7775) - mean (657ms)  : 643, 671
    master - mean (664ms)  : 649, 678

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 (7775) - mean (192ms)  : 188, 196
    master - mean (193ms)  : 189, 197

    section Bailout
    This PR (7775) - mean (197ms)  : 192, 201
    master - mean (196ms)  : 193, 198

    section CallTarget+Inlining+NGEN
    This PR (7775) - mean (1,164ms)  : 1098, 1229
    master - mean (1,172ms)  : 1094, 1250

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 (7775) - mean (276ms)  : 270, 281
    master - mean (278ms)  : 272, 283

    section Bailout
    This PR (7775) - mean (276ms)  : 273, 280
    master - mean (278ms)  : 272, 284

    section CallTarget+Inlining+NGEN
    This PR (7775) - mean (937ms)  : 894, 980
    master - mean (954ms)  : 915, 992

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7775) - mean (268ms)  : 263, 273
    master - mean (270ms)  : 265, 276

    section Bailout
    This PR (7775) - mean (269ms)  : 265, 272
    master - mean (270ms)  : 266, 273

    section CallTarget+Inlining+NGEN
    This PR (7775) - mean (919ms)  : 870, 968
    master - mean (933ms)  : 885, 980

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7775) - mean (268ms)  : 262, 274
    master - mean (268ms)  : 264, 273

    section Bailout
    This PR (7775) - mean (267ms)  : 264, 270
    master - mean (268ms)  : 265, 272

    section CallTarget+Inlining+NGEN
    This PR (7775) - mean (845ms)  : 827, 862
    master - mean (858ms)  : 839, 876

Loading

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Delightful!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Member

@andrewlock andrewlock left a comment

Choose a reason for hiding this comment

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

I'll leave the DSM team to confirm the correctness (compared to what we need + other implementations) but I think there's a fundamental issue which will break process tags in general for IIS apps.

The DataStreamsManager grabs the process tags immediately, in order to calculate the NodeHashBase, which triggers resolution of the tags. But this can happen too early and cause you to get the wrong process tags, particularly in asp.net.

I'm not sure what the best solution is here. You could make the nodehashbase calculation lazy too, but that still doesn't stop you grabbing it "too early". And presumably it's not acceptable for the process tags to ever change, as it would break all the DSM hashes. So you're stuck with DSM (which is on by default now) potentially breaking all your other process tags calculations 😕


// Should be in sync with Java
// https://github.com/DataDog/dd-trace-java/blob/a4b7a7b177709e6bdfd9261904cb9a777e4febbe/dd-trace-core/src/main/java/datadog/trace/core/datastreams/MsgPackDatastreamsPayloadWriter.java#L35
// https://github.com/DataDog/dd-trace-java/blob/master/dd-trace-core/src/main/java/datadog/trace/core/datastreams/MsgPackDatastreamsPayloadWriter.java
Copy link
Member

Choose a reason for hiding this comment

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

nit: don't use master for github links, because they break 😅

Suggested change
// https://github.com/DataDog/dd-trace-java/blob/master/dd-trace-core/src/main/java/datadog/trace/core/datastreams/MsgPackDatastreamsPayloadWriter.java
// https://github.com/DataDog/dd-trace-java/blob/8db72c0988adb1010c1f2d6b028b93b10cd10ff2/dd-trace-core/src/main/java/datadog/trace/core/datastreams/MsgPackDatastreamsPayloadWriter.java

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah hmm well, yes they do if the file moves, but also a link to a fixed sha loses its relevance as time passes (for instance, here it was pointing to code that had changed a lot). This could be especially problematic for a comment that says "keep in sync with ...".

if (withProcessTags)
{
bytesWritten += MessagePackBinary.WriteStringBytes(stream, _processTagsBytes);
bytesWritten += MessagePackBinary.WriteString(stream, ProcessTags.SerializedTags);
Copy link
Member

Choose a reason for hiding this comment

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

nit: not a fan of the fact that these are static globals, global state is the enemy of testing. Could/should we just pass it in as a parameter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm yes we can, but at some point we'd query them from the static global anyway. I don't know what would be the alternative for something that's supposed to be a singleton.

: null;

return new DataStreamsManager(settings.Environment, defaultServiceName, writer, settings.IsDataStreamsMonitoringInDefaultState);
return new DataStreamsManager(settings.Environment, defaultServiceName, writer, settings.IsDataStreamsMonitoringInDefaultState, settings.PropagateProcessTags ? ProcessTags.SerializedTags : null);
Copy link
Member

Choose a reason for hiding this comment

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

This calls ProcessTags.SerializedTags, which realizes the tags. Given that the DataStreamsManager is created in the app initialization (before a request has arrived), I think this completely breaks the "lazy" aspect of the serialized tags? 🤔

@vandonr
Copy link
Contributor Author

vandonr commented Nov 5, 2025

I'll leave the DSM team to confirm the correctness (compared to what we need + other implementations) but I think there's a fundamental issue which will break process tags in general for IIS apps.

The DataStreamsManager grabs the process tags immediately, in order to calculate the NodeHashBase, which triggers resolution of the tags. But this can happen too early and cause you to get the wrong process tags, particularly in asp.net.

I'm not sure what the best solution is here. You could make the nodehashbase calculation lazy too, but that still doesn't stop you grabbing it "too early". And presumably it's not acceptable for the process tags to ever change, as it would break all the DSM hashes. So you're stuck with DSM (which is on by default now) potentially breaking all your other process tags calculations 😕

yes I know, but I don't see a way out of this. I'm thinking about just giving up on application entrypoint for IIS, since it seems every time I add process tags somewhere in the tracer it creates more issues because it can be requested too early.
Since process tags are not a "nice to have" but something mandatory as soon as customer starts to use them to build their service name, we cannot do any retry like we do in other places.
As you say, I can make this lazy, but there is still no guarantee. I was thinking of just "letting it rip", i.e. we try to get the entry point, and if we don't, well we don't.
It's more something I need to check with the service renaming team than with DSM.

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Nov 5, 2025

⚠️ Tests

⚠️ Warnings

❄️ 3 New flaky tests detected

TestSecurity from Datadog.Trace.Security.IntegrationTests.AspNetCoreBare (Datadog)
Results do not match.
Differences:
Received: Security.AspNetCoreBare.__expectedStatusCode=200_url=_good-param=[$slice].received.txt
Verified: Security.AspNetCoreBare.__expectedStatusCode=200_url=_good-param=[$slice].verified.txt
Compare Result:
- [
+ []
-   {
-     TraceId: Id_1,
-     SpanId: Id_2,
...
TestSecurity from Datadog.Trace.Security.IntegrationTests.AspNetCoreBare (Datadog)
Unable to determine port application is listening on
TestSecurity from Datadog.Trace.Security.IntegrationTests.AspNetCoreBare (Datadog)
Results do not match.
Differences:
Received: Security.AspNetCoreBare.__expectedStatusCode=200_url=_void-param=[$slice].received.txt
Verified: Security.AspNetCoreBare.__expectedStatusCode=200_url=_void-param=[$slice].verified.txt
Compare Result:
- [
+ []
-   {
-     TraceId: Id_1,
-     SpanId: Id_2,
...

ℹ️ Info

🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: d0f1af6 | Docs | Datadog PR Page | Was this helpful? 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.

3 participants