Skip to content

Conversation

@andrewlock
Copy link
Member

@andrewlock andrewlock commented Oct 28, 2025

Summary of changes

Enforces that you can't change the AgentUri to be a UDS Uri if you're on Windows

Reason for change

The trace exporter doesn't work with UDS on Windows, so we have a check in TracerSettings that disables the pipeline if we find this scenario. However, user's can still change the agent URI at runtime in code (😭).

We currently assume that the data pipeline won't be toggled at runtime (we do allow for reconfiguring it in general, but not for completely removing or reintroducing). Changing this to allow the scenario would be a pain, so instead this PR blocks you from setting a UDS URI in code if you're on Windows.

The good news is that as far as I can tell, noone does this today, so while technically it could be considered a breaking change, I think it's ok.

Implementation details

  • Throw an ArgumentException in the Datadog.Trace.Manual library, if you're on Windows (or .NET FX) and you try to set a UDS agent URI (using the same "detection" we do in ExporterSettings.
  • Add a check in the Instrumentation of Tracer.Configure() to make sure it hasn't slipped through. This could happen if a customer was using an old version of the Datadog.Trace NuGet package with a newer version of auto instrumentation.

Note that this adds two additional framework references for .NET Core 3.1+, to check if we're on Windows.

Test coverage

Added an extra step to the manual instrumentation integration test to confirm we throw

Other details

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

Part of a config stack

@pr-commenter
Copy link

pr-commenter bot commented Oct 28, 2025

Benchmarks

Benchmarks Report for benchmark platform 🐌

Benchmarks for #7721 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.209
  • 4 benchmarks have fewer allocations
  • 6 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 ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #7721

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 6.11 KB 6.05 KB -59 B -0.97%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 10.7μs 55.6ns 289ns 0 0 0 5.51 KB
master StartStopWithChild netcoreapp3.1 13.6μs 68.7ns 315ns 0 0 0 5.7 KB
master StartStopWithChild net472 22.1μs 117ns 585ns 0.893 0.223 0 6.11 KB
#7721 StartStopWithChild net6.0 10.6μs 58.2ns 335ns 0 0 0 5.52 KB
#7721 StartStopWithChild netcoreapp3.1 13.4μs 67.8ns 295ns 0 0 0 5.73 KB
#7721 StartStopWithChild net472 21.5μs 114ns 582ns 0.978 0.326 0.109 6.05 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 927μs 645ns 2.5μs 0 0 0 2.71 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 1.02ms 85.2ns 307ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 1.19ms 77.5ns 300ns 0 0 0 3.31 KB
#7721 WriteAndFlushEnrichedTraces net6.0 932μs 1.86μs 7.2μs 0 0 0 2.7 KB
#7721 WriteAndFlushEnrichedTraces netcoreapp3.1 1.02ms 402ns 1.56μs 0 0 0 2.7 KB
#7721 WriteAndFlushEnrichedTraces net472 1.2ms 40.8ns 141ns 0 0 0 3.31 KB
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Unknown 🤷 Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 N/A N/A N/A NaN NaN NaN 0 b
master AllCycleSimpleBody netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
master AllCycleSimpleBody net472 N/A N/A N/A NaN NaN NaN 0 b
master AllCycleMoreComplexBody net6.0 N/A N/A N/A NaN NaN NaN 0 b
master AllCycleMoreComplexBody netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
master AllCycleMoreComplexBody net472 N/A N/A N/A NaN NaN NaN 0 b
master ObjectExtractorSimpleBody net6.0 316ns 1.71ns 9.36ns 0 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 406ns 2.24ns 12.7ns 0 0 0 272 B
master ObjectExtractorSimpleBody net472 302ns 0.0515ns 0.199ns 0.044 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 6.3μs 31.1ns 139ns 0 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 7.86μs 38.1ns 162ns 0 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 6.67μs 1.66ns 6.41ns 0.6 0 0 3.8 KB
#7721 AllCycleSimpleBody net6.0 N/A N/A N/A NaN NaN NaN 0 b
#7721 AllCycleSimpleBody netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
#7721 AllCycleSimpleBody net472 N/A N/A N/A NaN NaN NaN 0 b
#7721 AllCycleMoreComplexBody net6.0 N/A N/A N/A NaN NaN NaN 0 b
#7721 AllCycleMoreComplexBody netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
#7721 AllCycleMoreComplexBody net472 N/A N/A N/A NaN NaN NaN 0 b
#7721 ObjectExtractorSimpleBody net6.0 329ns 0.0612ns 0.229ns 0 0 0 280 B
#7721 ObjectExtractorSimpleBody netcoreapp3.1 402ns 1.98ns 8.42ns 0 0 0 272 B
#7721 ObjectExtractorSimpleBody net472 299ns 0.0302ns 0.113ns 0.0431 0 0 281 B
#7721 ObjectExtractorMoreComplexBody net6.0 6.26μs 31.3ns 137ns 0 0 0 3.78 KB
#7721 ObjectExtractorMoreComplexBody netcoreapp3.1 7.85μs 29.8ns 112ns 0 0 0 3.69 KB
#7721 ObjectExtractorMoreComplexBody net472 6.68μs 3.54ns 13.7ns 0.571 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.3μs 85.6ns 331ns 0 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 96.8μs 267ns 1.03μs 0 0 0 32.4 KB
master EncodeArgs net472 111μs 9.95ns 38.5ns 5.02 0 0 32.5 KB
master EncodeLegacyArgs net6.0 143μs 36.6ns 142ns 0 0 0 2.15 KB
master EncodeLegacyArgs netcoreapp3.1 198μs 272ns 1.05μs 0 0 0 2.14 KB
master EncodeLegacyArgs net472 263μs 145ns 562ns 0 0 0 2.16 KB
#7721 EncodeArgs net6.0 76.6μs 235ns 847ns 0 0 0 32.4 KB
#7721 EncodeArgs netcoreapp3.1 98.2μs 292ns 1.13μs 0 0 0 32.4 KB
#7721 EncodeArgs net472 109μs 5.89ns 21.3ns 4.93 0 0 32.5 KB
#7721 EncodeLegacyArgs net6.0 143μs 91.1ns 353ns 0 0 0 2.15 KB
#7721 EncodeLegacyArgs netcoreapp3.1 199μs 461ns 1.79μs 0 0 0 2.15 KB
#7721 EncodeLegacyArgs net472 260μs 28.8ns 111ns 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 78.7ns 295ns 0 0 0 4.56 KB
master RunWafRealisticBenchmark netcoreapp3.1 415μs 171ns 616ns 0 0 0 4.48 KB
master RunWafRealisticBenchmark net472 429μs 35.7ns 129ns 0 0 0 4.66 KB
master RunWafRealisticBenchmarkWithAttack net6.0 286μs 63.3ns 237ns 0 0 0 2.24 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 299μs 214ns 827ns 0 0 0 2.22 KB
master RunWafRealisticBenchmarkWithAttack net472 311μs 21.1ns 76.2ns 0 0 0 2.29 KB
#7721 RunWafRealisticBenchmark net6.0 392μs 100ns 375ns 0 0 0 4.55 KB
#7721 RunWafRealisticBenchmark netcoreapp3.1 415μs 64.3ns 223ns 0 0 0 4.48 KB
#7721 RunWafRealisticBenchmark net472 427μs 66.3ns 257ns 0 0 0 4.66 KB
#7721 RunWafRealisticBenchmarkWithAttack net6.0 282μs 31.2ns 108ns 0 0 0 2.24 KB
#7721 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 297μs 35.3ns 122ns 0 0 0 2.22 KB
#7721 RunWafRealisticBenchmarkWithAttack net472 309μs 27.5ns 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 58.7ns 220ns 0 0 0 14.52 KB
master SendRequest netcoreapp3.1 70.9μs 162ns 586ns 0 0 0 17.42 KB
master SendRequest net472 0.00244ns 0.000969ns 0.00375ns 0 0 0 0 b
#7721 SendRequest net6.0 60.1μs 54.9ns 213ns 0 0 0 14.52 KB
#7721 SendRequest netcoreapp3.1 70.9μs 393ns 2.55μs 0 0 0 17.42 KB
#7721 SendRequest net472 0.00643ns 0.0018ns 0.00698ns 0 0 0 0 b
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7721

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

Fewer allocations 🎉 in #7721

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472 73 B 0 b -73 B -100.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472 51 B 0 b -51 B -100.00%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master OriginalCharSlice net6.0 1.91ms 3.51μs 13.6μs 0 0 0 640.01 KB
master OriginalCharSlice netcoreapp3.1 2.09ms 3μs 10.8μs 0 0 0 640 KB
master OriginalCharSlice net472 2.55ms 116ns 451ns 100 0 0 641.95 KB
master OptimizedCharSlice net6.0 1.4ms 932ns 3.61μs 0 0 0 4 B
master OptimizedCharSlice netcoreapp3.1 1.82ms 444ns 1.72μs 0 0 0 1 B
master OptimizedCharSlice net472 1.97ms 315ns 1.18μs 0 0 0 73 B
master OptimizedCharSliceWithPool net6.0 898μs 45.5ns 176ns 0 0 0 5 B
master OptimizedCharSliceWithPool netcoreapp3.1 816μs 83.9ns 314ns 0 0 0 0 b
master OptimizedCharSliceWithPool net472 1.15ms 120ns 464ns 0 0 0 51 B
#7721 OriginalCharSlice net6.0 1.89ms 6.1μs 22.8μs 0 0 0 640.01 KB
#7721 OriginalCharSlice netcoreapp3.1 2.28ms 7.84μs 29.3μs 0 0 0 640 KB
#7721 OriginalCharSlice net472 2.7ms 136ns 492ns 100 0 0 641.95 KB
#7721 OptimizedCharSlice net6.0 1.36ms 502ns 1.95μs 0 0 0 7 B
#7721 OptimizedCharSlice netcoreapp3.1 1.81ms 206ns 772ns 0 0 0 1 B
#7721 OptimizedCharSlice net472 2.04ms 535ns 2.07μs 0 0 0 0 b
#7721 OptimizedCharSliceWithPool net6.0 881μs 59.9ns 232ns 0 0 0 5 B
#7721 OptimizedCharSliceWithPool netcoreapp3.1 814μs 146ns 564ns 0 0 0 3 B
#7721 OptimizedCharSliceWithPool net472 1.13ms 102ns 381ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Faster 🎉 More allocations ⚠️

Faster 🎉 in #7721

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 1.209 782,873.08 647,796.39

More allocations ⚠️ in #7721

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 41.77 KB 42.16 KB 390 B 0.93%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 709μs 3.92μs 25.1μs 0 0 0 41.77 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 764μs 4.41μs 35μs 0 0 0 41.77 KB
master WriteAndFlushEnrichedTraces net472 967μs 5.38μs 32.7μs 4.46 0 0 56.12 KB
#7721 WriteAndFlushEnrichedTraces net6.0 675μs 2.43μs 8.4μs 0 0 0 41.6 KB
#7721 WriteAndFlushEnrichedTraces netcoreapp3.1 643μs 2.46μs 9.19μs 0 0 0 42.16 KB
#7721 WriteAndFlushEnrichedTraces net472 915μs 1.52μs 5.46μs 4.46 0 0 56.05 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.94μs 5.14ns 17.8ns 0 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 2.93μs 11.7ns 45.2ns 0 0 0 1.02 KB
master ExecuteNonQuery net472 2.83μs 3.88ns 15ns 0.155 0.0141 0 987 B
#7721 ExecuteNonQuery net6.0 1.84μs 9.02ns 38.3ns 0 0 0 1.02 KB
#7721 ExecuteNonQuery netcoreapp3.1 2.71μs 9.99ns 38.7ns 0 0 0 1.02 KB
#7721 ExecuteNonQuery net472 2.88μs 3.44ns 13.3ns 0.145 0.0145 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.73μs 2.01ns 7.79ns 0 0 0 1.03 KB
master CallElasticsearch netcoreapp3.1 2.21μs 8.11ns 31.4ns 0 0 0 1.03 KB
master CallElasticsearch net472 3.76μs 6.48ns 25.1ns 0.149 0 0 1.04 KB
master CallElasticsearchAsync net6.0 1.86μs 7.73ns 27.9ns 0 0 0 1.01 KB
master CallElasticsearchAsync netcoreapp3.1 2.34μs 11.2ns 44.7ns 0 0 0 1.08 KB
master CallElasticsearchAsync net472 3.75μs 1.82ns 7.05ns 0.167 0 0 1.1 KB
#7721 CallElasticsearch net6.0 1.72μs 0.877ns 3.28ns 0 0 0 1.03 KB
#7721 CallElasticsearch netcoreapp3.1 2.17μs 6.99ns 27.1ns 0 0 0 1.03 KB
#7721 CallElasticsearch net472 3.59μs 6.71ns 26ns 0.162 0 0 1.04 KB
#7721 CallElasticsearchAsync net6.0 1.85μs 0.481ns 1.8ns 0 0 0 1.01 KB
#7721 CallElasticsearchAsync netcoreapp3.1 2.4μs 12.1ns 51.4ns 0 0 0 1.08 KB
#7721 CallElasticsearchAsync net472 3.7μs 1.59ns 6.17ns 0.166 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.85μs 3.48ns 13.5ns 0 0 0 952 B
master ExecuteAsync netcoreapp3.1 2.49μs 2.08ns 7.51ns 0 0 0 952 B
master ExecuteAsync net472 2.62μs 3.8ns 13.7ns 0.144 0 0 915 B
#7721 ExecuteAsync net6.0 1.95μs 2.34ns 8.76ns 0 0 0 952 B
#7721 ExecuteAsync netcoreapp3.1 2.52μs 7.01ns 26.2ns 0 0 0 952 B
#7721 ExecuteAsync net472 2.65μs 3.87ns 15ns 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.83μs 5.82ns 21.8ns 0 0 0 2.36 KB
master SendAsync netcoreapp3.1 8.58μs 10.6ns 41.2ns 0 0 0 2.9 KB
master SendAsync net472 12.3μs 10.6ns 41.2ns 0.49 0 0 3.18 KB
#7721 SendAsync net6.0 6.88μs 5.47ns 21.2ns 0 0 0 2.36 KB
#7721 SendAsync netcoreapp3.1 8.5μs 21.6ns 83.8ns 0 0 0 2.9 KB
#7721 SendAsync net472 12.1μs 24.4ns 94.5ns 0.484 0 0 3.18 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7721

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 57.34 KB 65.54 KB 8.19 KB 14.29%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 278.53 KB 294.91 KB 16.38 KB 5.88%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 275.52 KB 277.1 KB 1.58 KB 0.57%

Fewer allocations 🎉 in #7721

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 276.69 KB 272.94 KB -3.74 KB -1.35%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 41μs 222ns 1.15μs 0 0 0 43.62 KB
master StringConcatBenchmark netcoreapp3.1 51.5μs 381ns 3.69μs 0 0 0 42.83 KB
master StringConcatBenchmark net472 56.7μs 222ns 917ns 0 0 0 57.34 KB
master StringConcatAspectBenchmark net6.0 477μs 1.03μs 3.55μs 0 0 0 276.69 KB
master StringConcatAspectBenchmark netcoreapp3.1 534μs 2.63μs 11.2μs 0 0 0 275.52 KB
master StringConcatAspectBenchmark net472 404μs 2.2μs 13.2μs 0 0 0 278.53 KB
#7721 StringConcatBenchmark net6.0 44.4μs 244ns 1.38μs 0 0 0 43.54 KB
#7721 StringConcatBenchmark netcoreapp3.1 47.2μs 254ns 1.87μs 0 0 0 42.64 KB
#7721 StringConcatBenchmark net472 57.3μs 149ns 557ns 0 0 0 65.54 KB
#7721 StringConcatAspectBenchmark net6.0 467μs 1.88μs 6.52μs 0 0 0 272.94 KB
#7721 StringConcatAspectBenchmark netcoreapp3.1 553μs 2.42μs 8.38μs 0 0 0 277.1 KB
#7721 StringConcatAspectBenchmark net472 401μs 2.21μs 19.5μs 0 0 0 294.91 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.67μs 2.89ns 11.2ns 0 0 0 1.7 KB
master EnrichedLog netcoreapp3.1 3.56μs 17.7ns 73.2ns 0 0 0 1.7 KB
master EnrichedLog net472 3.84μs 2.02ns 7.81ns 0.25 0 0 1.64 KB
#7721 EnrichedLog net6.0 2.62μs 13.8ns 67.4ns 0 0 0 1.7 KB
#7721 EnrichedLog netcoreapp3.1 3.69μs 17.6ns 68.1ns 0 0 0 1.7 KB
#7721 EnrichedLog net472 4.09μs 3.41ns 13.2ns 0.245 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 123μs 143ns 516ns 0 0 0 4.31 KB
master EnrichedLog netcoreapp3.1 127μs 414ns 1.55μs 0 0 0 4.31 KB
master EnrichedLog net472 167μs 131ns 506ns 0 0 0 4.52 KB
#7721 EnrichedLog net6.0 124μs 169ns 632ns 0 0 0 4.31 KB
#7721 EnrichedLog netcoreapp3.1 130μs 86.2ns 323ns 0 0 0 4.31 KB
#7721 EnrichedLog net472 169μs 422ns 1.63μ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.94μs 21.3ns 82.6ns 0 0 0 2.26 KB
master EnrichedLog netcoreapp3.1 6.7μs 22.5ns 87.2ns 0 0 0 2.26 KB
master EnrichedLog net472 7.73μs 10.4ns 40.4ns 0.309 0 0 2.08 KB
#7721 EnrichedLog net6.0 5.01μs 17.5ns 67.6ns 0 0 0 2.26 KB
#7721 EnrichedLog netcoreapp3.1 7.15μs 14ns 54.2ns 0 0 0 2.26 KB
#7721 EnrichedLog net472 7.58μs 9.46ns 36.7ns 0.301 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 1.97μs 6.48ns 25.1ns 0 0 0 1.2 KB
master SendReceive netcoreapp3.1 2.76μs 9.28ns 34.7ns 0 0 0 1.2 KB
master SendReceive net472 2.99μs 1.84ns 7.11ns 0.179 0 0 1.2 KB
#7721 SendReceive net6.0 1.91μs 9.97ns 49.9ns 0 0 0 1.2 KB
#7721 SendReceive netcoreapp3.1 2.55μs 12.3ns 47.6ns 0 0 0 1.2 KB
#7721 SendReceive net472 3.03μs 4.3ns 16.6ns 0.181 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.42μs 0.87ns 3.26ns 0 0 0 1.58 KB
master EnrichedLog netcoreapp3.1 5.69μs 10.6ns 41ns 0 0 0 1.63 KB
master EnrichedLog net472 6.46μs 4.67ns 17.5ns 0.29 0 0 2.03 KB
#7721 EnrichedLog net6.0 4.25μs 5.1ns 19.8ns 0 0 0 1.58 KB
#7721 EnrichedLog netcoreapp3.1 5.58μs 17.2ns 66.6ns 0 0 0 1.63 KB
#7721 EnrichedLog net472 6.67μs 7.89ns 30.6ns 0.299 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 767ns 1.54ns 5.96ns 0 0 0 576 B
master StartFinishSpan netcoreapp3.1 979ns 3.6ns 14ns 0 0 0 576 B
master StartFinishSpan net472 950ns 0.189ns 0.706ns 0.0906 0 0 578 B
master StartFinishScope net6.0 918ns 4.33ns 16.8ns 0 0 0 696 B
master StartFinishScope netcoreapp3.1 1.22μs 5.72ns 22.1ns 0 0 0 696 B
master StartFinishScope net472 1.16μs 2.76ns 10.7ns 0.1 0 0 658 B
#7721 StartFinishSpan net6.0 778ns 3.82ns 16.2ns 0 0 0 576 B
#7721 StartFinishSpan netcoreapp3.1 961ns 4.86ns 22.8ns 0 0 0 576 B
#7721 StartFinishSpan net472 955ns 0.17ns 0.66ns 0.0906 0 0 578 B
#7721 StartFinishScope net6.0 900ns 4.99ns 29.5ns 0 0 0 696 B
#7721 StartFinishScope netcoreapp3.1 1.21μs 5.75ns 22.3ns 0 0 0 696 B
#7721 StartFinishScope net472 1.15μs 0.341ns 1.28ns 0.104 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.06μs 5.26ns 24.1ns 0 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 1.4μs 6.81ns 27.2ns 0 0 0 696 B
master RunOnMethodBegin net472 1.42μs 0.838ns 3.25ns 0.0994 0 0 658 B
#7721 RunOnMethodBegin net6.0 1.04μs 5.01ns 20ns 0 0 0 696 B
#7721 RunOnMethodBegin netcoreapp3.1 1.42μs 5.72ns 20.6ns 0 0 0 696 B
#7721 RunOnMethodBegin net472 1.47μs 2.56ns 9.9ns 0.104 0 0 658 B

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

dd-trace-dotnet-ci-bot bot commented Oct 28, 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 (7721) - mean (81ms)  : 75, 88
     .   : milestone, 81,
    master - mean (76ms)  : 74, 78
     .   : milestone, 76,

    section Baseline
    This PR (7721) - mean (75ms)  : 70, 80
     .   : milestone, 75,
    master - mean (74ms)  : 67, 80
     .   : milestone, 74,

    section CallTarget+Inlining+NGEN
    This PR (7721) - mean (1,133ms)  : 1027, 1239
     .   : milestone, 1133,
    master - mean (1,081ms)  : 1000, 1163
     .   : milestone, 1081,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7721) - mean (125ms)  : crit, 114, 136
     .   : crit, milestone, 125,
    master - mean (114ms)  : 109, 120
     .   : milestone, 114,

    section Baseline
    This PR (7721) - mean (122ms)  : 111, 134
     .   : milestone, 122,
    master - mean (112ms)  : 107, 117
     .   : milestone, 112,

    section CallTarget+Inlining+NGEN
    This PR (7721) - mean (814ms)  : 762, 867
     .   : milestone, 814,
    master - mean (782ms)  : 741, 824
     .   : milestone, 782,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7721) - mean (108ms)  : 99, 117
     .   : milestone, 108,
    master - mean (104ms)  : 97, 111
     .   : milestone, 104,

    section Baseline
    This PR (7721) - mean (105ms)  : 97, 112
     .   : milestone, 105,
    master - mean (104ms)  : 97, 112
     .   : milestone, 104,

    section CallTarget+Inlining+NGEN
    This PR (7721) - mean (761ms)  : 702, 821
     .   : milestone, 761,
    master - mean (780ms)  : 709, 850
     .   : milestone, 780,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7721) - mean (106ms)  : 98, 113
     .   : milestone, 106,
    master - mean (108ms)  : 100, 116
     .   : milestone, 108,

    section Baseline
    This PR (7721) - mean (106ms)  : 99, 114
     .   : milestone, 106,
    master - mean (108ms)  : 100, 116
     .   : milestone, 108,

    section CallTarget+Inlining+NGEN
    This PR (7721) - mean (716ms)  : 670, 762
     .   : milestone, 716,
    master - mean (736ms)  : 697, 776
     .   : milestone, 736,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7721) - mean (197ms)  : 195, 200
     .   : milestone, 197,
    master - mean (199ms)  : 193, 204
     .   : milestone, 199,

    section Baseline
    This PR (7721) - mean (194ms)  : 190, 198
     .   : milestone, 194,
    master - mean (196ms)  : 188, 204
     .   : milestone, 196,

    section CallTarget+Inlining+NGEN
    This PR (7721) - mean (1,168ms)  : 1102, 1234
     .   : milestone, 1168,
    master - mean (1,189ms)  : 1102, 1276
     .   : milestone, 1189,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7721) - mean (277ms)  : 272, 282
     .   : milestone, 277,
    master - mean (281ms)  : 271, 291
     .   : milestone, 281,

    section Baseline
    This PR (7721) - mean (277ms)  : 272, 283
     .   : milestone, 277,
    master - mean (279ms)  : 272, 285
     .   : milestone, 279,

    section CallTarget+Inlining+NGEN
    This PR (7721) - mean (946ms)  : 905, 986
     .   : milestone, 946,
    master - mean (957ms)  : 899, 1015
     .   : milestone, 957,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7721) - mean (271ms)  : 266, 276
     .   : milestone, 271,
    master - mean (272ms)  : 265, 279
     .   : milestone, 272,

    section Baseline
    This PR (7721) - mean (270ms)  : 265, 274
     .   : milestone, 270,
    master - mean (270ms)  : 265, 274
     .   : milestone, 270,

    section CallTarget+Inlining+NGEN
    This PR (7721) - mean (943ms)  : 894, 993
     .   : milestone, 943,
    master - mean (944ms)  : 883, 1004
     .   : milestone, 944,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7721) - mean (272ms)  : 266, 279
     .   : milestone, 272,
    master - mean (271ms)  : 264, 279
     .   : milestone, 271,

    section Baseline
    This PR (7721) - mean (270ms)  : 265, 274
     .   : milestone, 270,
    master - mean (271ms)  : 263, 279
     .   : milestone, 271,

    section CallTarget+Inlining+NGEN
    This PR (7721) - mean (852ms)  : 834, 871
     .   : milestone, 852,
    master - mean (863ms)  : 843, 882
     .   : milestone, 863,

Loading

andrewlock

This comment was marked as resolved.

@andrewlock andrewlock force-pushed the andrew/settings/4a-block-uds-windows branch from 4421414 to 213ef9c Compare October 28, 2025 18:13
#endif
value.OriginalString.StartsWith("unix://", StringComparison.OrdinalIgnoreCase))
{
throw new ArgumentException(
Copy link
Member

Choose a reason for hiding this comment

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

Should this use the throw helper instead of using throw directly?

Copy link
Member

Choose a reason for hiding this comment

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

Oh, not available in Datadog.Trace.Manual?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, this is throwing an ArgumentException, not our special CallTargetBubbleUpException that we have to make sure to throw in our integrations. ArgumentException seems like the correct option to me here?

Copy link
Member

Choose a reason for hiding this comment

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

I meant the ThrowHelper helper methods we use to throw exceptions to improve the chances that a method can be inlined by avoiding a direct throw. source

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh right, you meant those ones, yeah, meh 😄 especially given we mark everything as NoInlining 😅

@andrewlock andrewlock merged commit 2772023 into master Oct 31, 2025
152 checks passed
@andrewlock andrewlock deleted the andrew/settings/4a-block-uds-windows branch October 31, 2025 17:05
@github-actions github-actions bot added this to the vNext-v3 milestone Oct 31, 2025
andrewlock added a commit that referenced this pull request Nov 3, 2025
## Summary of changes

Add a helper for comparing `ReadOnlyDictionary<>` instances

## Reason for change

As part of the config work, we need to detect if tags have changed when
customers do a manual/remote config update. This helper makes it easy

## Implementation details

Added a `SequenceEqual` extension method.

Note that I used `SequenceEqual` because it _already_ exists in
_System.Linq_, but I could see an argument that it's too easy to use the
wrong one, and instead we could use a different name? `IsSameAs(other)`?

Also, I only wrote this for `ReadOnlyDictionary<>` because that's all we
need, it's what we use for all our setting dictionaries, and it will be
(a tiny bit) faster than making it `IDictionary<>`, but happy to change
if people feel strongly.

## Test coverage

Added unit tests

## Other details

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

Part of a config stack


- #7522
- #7525
- #7530
- #7532
- #7543
- #7544
- #7721
- #7722 👈
- #7695
- #7723
- #7724

---------

Co-authored-by: Steven Bouwkamp <[email protected]>
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) breaking-change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants