Skip to content

Conversation

@andrewlock
Copy link
Member

Summary of changes

Improve handling of telemetry redaction of AggregateException

Reason for change

While investigating something else, I noticed that we were not including all the inner exceptions when recording AggregateException. If there's more than one exception previously we were only including the first exception.

Implementation details

Update ExceptionRedactor to include all the inner exceptions of an AggregateException

Test coverage

Added a couple of unit tests

@pr-commenter
Copy link

pr-commenter bot commented Nov 3, 2025

Benchmarks

Benchmarks Report for benchmark platform 🐌

Benchmarks for #7754 compared to master:

  • 1 benchmarks are slower, with geometric mean 1.709
  • 7 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 ✔️ More allocations ⚠️

More allocations ⚠️ in #7754

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 6.05 KB 6.14 KB 92 B 1.52%

Fewer allocations 🎉 in #7754

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑netcoreapp3.1 5.71 KB 5.66 KB -48 B -0.84%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 11.4μs 55ns 233ns 0 0 0 5.52 KB
master StartStopWithChild netcoreapp3.1 13.7μs 68.5ns 291ns 0 0 0 5.71 KB
master StartStopWithChild net472 21.9μs 114ns 591ns 0.883 0.221 0 6.05 KB
#7754 StartStopWithChild net6.0 10.6μs 58.9ns 368ns 0 0 0 5.51 KB
#7754 StartStopWithChild netcoreapp3.1 14.1μs 72.3ns 331ns 0 0 0 5.66 KB
#7754 StartStopWithChild net472 22.1μs 108ns 457ns 0.893 0.223 0 6.14 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 940μs 73.7ns 255ns 0 0 0 2.71 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 1.01ms 648ns 2.51μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 1.19ms 70.7ns 255ns 0 0 0 3.31 KB
#7754 WriteAndFlushEnrichedTraces net6.0 943μs 158ns 569ns 0 0 0 2.71 KB
#7754 WriteAndFlushEnrichedTraces netcoreapp3.1 1.02ms 270ns 1.05μs 0 0 0 2.7 KB
#7754 WriteAndFlushEnrichedTraces net472 1.21ms 168ns 629ns 0 0 0 3.31 KB
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 1.07μs 5.75ns 29.9ns 0 0 0 1.22 KB
master AllCycleSimpleBody netcoreapp3.1 1.41μs 7.61ns 43.1ns 0 0 0 1.2 KB
master AllCycleSimpleBody net472 1.03μs 0.326ns 1.22ns 0.194 0 0 1.23 KB
master AllCycleMoreComplexBody net6.0 6.97μs 36.9ns 202ns 0 0 0 4.72 KB
master AllCycleMoreComplexBody netcoreapp3.1 9.08μs 41.6ns 167ns 0 0 0 4.62 KB
master AllCycleMoreComplexBody net472 7.58μs 3.67ns 14.2ns 0.719 0 0 4.74 KB
master ObjectExtractorSimpleBody net6.0 317ns 1.7ns 9ns 0 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 396ns 2.25ns 15.3ns 0 0 0 272 B
master ObjectExtractorSimpleBody net472 300ns 0.064ns 0.24ns 0.0438 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 6.32μs 29.7ns 126ns 0 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 7.77μs 29.3ns 114ns 0 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 6.68μs 1.8ns 6.98ns 0.602 0 0 3.8 KB
#7754 AllCycleSimpleBody net6.0 1.07μs 6.25ns 52.6ns 0 0 0 1.22 KB
#7754 AllCycleSimpleBody netcoreapp3.1 1.44μs 1.03ns 3.98ns 0 0 0 1.2 KB
#7754 AllCycleSimpleBody net472 1.13μs 0.689ns 2.67ns 0.193 0 0 1.23 KB
#7754 AllCycleMoreComplexBody net6.0 7.03μs 38.7ns 219ns 0 0 0 4.72 KB
#7754 AllCycleMoreComplexBody netcoreapp3.1 9.14μs 3.57ns 13.8ns 0 0 0 4.62 KB
#7754 AllCycleMoreComplexBody net472 7.85μs 9.29ns 36ns 0.75 0 0 4.74 KB
#7754 ObjectExtractorSimpleBody net6.0 341ns 1.74ns 8.54ns 0 0 0 280 B
#7754 ObjectExtractorSimpleBody netcoreapp3.1 395ns 2.18ns 12.9ns 0 0 0 272 B
#7754 ObjectExtractorSimpleBody net472 299ns 0.0722ns 0.279ns 0.0444 0 0 281 B
#7754 ObjectExtractorMoreComplexBody net6.0 6.27μs 30.7ns 134ns 0 0 0 3.78 KB
#7754 ObjectExtractorMoreComplexBody netcoreapp3.1 7.98μs 13ns 50.2ns 0 0 0 3.69 KB
#7754 ObjectExtractorMoreComplexBody net472 6.66μs 3.1ns 12ns 0.601 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.9μs 168ns 652ns 0 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 96.7μs 280ns 1.05μs 0 0 0 32.4 KB
master EncodeArgs net472 112μs 15.4ns 59.7ns 5.02 0 0 32.5 KB
master EncodeLegacyArgs net6.0 144μs 47.8ns 179ns 0 0 0 2.15 KB
master EncodeLegacyArgs netcoreapp3.1 199μs 189ns 732ns 0 0 0 2.14 KB
master EncodeLegacyArgs net472 262μs 150ns 583ns 0 0 0 2.16 KB
#7754 EncodeArgs net6.0 76.5μs 273ns 1.06μs 0 0 0 32.4 KB
#7754 EncodeArgs netcoreapp3.1 96.8μs 199ns 772ns 0 0 0 32.4 KB
#7754 EncodeArgs net472 110μs 9.04ns 33.8ns 4.94 0 0 32.51 KB
#7754 EncodeLegacyArgs net6.0 144μs 52.2ns 195ns 0 0 0 2.15 KB
#7754 EncodeLegacyArgs netcoreapp3.1 199μs 281ns 1.05μs 0 0 0 2.14 KB
#7754 EncodeLegacyArgs net472 264μs 100ns 388ns 0 0 0 2.16 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #7754

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 1.709 296,601.22 506,757.44

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWafRealisticBenchmark net6.0 396μs 89.2ns 345ns 0 0 0 4.55 KB
master RunWafRealisticBenchmark netcoreapp3.1 411μs 163ns 586ns 0 0 0 4.48 KB
master RunWafRealisticBenchmark net472 429μs 90.6ns 351ns 0 0 0 4.66 KB
master RunWafRealisticBenchmarkWithAttack net6.0 295μs 84ns 314ns 0 0 0 2.24 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 297μs 106ns 409ns 0 0 0 2.22 KB
master RunWafRealisticBenchmarkWithAttack net472 314μs 25.1ns 93.8ns 0 0 0 2.29 KB
#7754 RunWafRealisticBenchmark net6.0 394μs 117ns 454ns 0 0 0 4.55 KB
#7754 RunWafRealisticBenchmark netcoreapp3.1 413μs 85.7ns 297ns 0 0 0 4.48 KB
#7754 RunWafRealisticBenchmark net472 429μs 54.3ns 210ns 0 0 0 4.66 KB
#7754 RunWafRealisticBenchmarkWithAttack net6.0 289μs 508ns 1.97μs 0 0 0 2.24 KB
#7754 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 502μs 2.94μs 26.4μs 0 0 0 2.22 KB
#7754 RunWafRealisticBenchmarkWithAttack net472 310μs 28.5ns 110ns 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.5μs 62.5ns 225ns 0 0 0 14.52 KB
master SendRequest netcoreapp3.1 73.6μs 399ns 2.15μs 0 0 0 17.42 KB
master SendRequest net472 0.00285ns 0.00147ns 0.00569ns 0 0 0 0 b
#7754 SendRequest net6.0 61.2μs 24.8ns 92.9ns 0 0 0 14.52 KB
#7754 SendRequest netcoreapp3.1 72.1μs 82.9ns 321ns 0 0 0 17.42 KB
#7754 SendRequest net472 0.01ns 0.00275ns 0.0107ns 0 0 0 0 b
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7754

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 2 B 7 B 5 B 250.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 4 B 5 B 1 B 25.00%

Fewer allocations 🎉 in #7754

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472 48 B 47 B -1 B -2.08%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472 85 B 73 B -12 B -14.12%
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.95ms 169ns 654ns 0 0 0 640.01 KB
master OriginalCharSlice netcoreapp3.1 2.11ms 2.98μs 10.8μs 0 0 0 640 KB
master OriginalCharSlice net472 2.69ms 176ns 681ns 100 0 0 641.95 KB
master OptimizedCharSlice net6.0 1.41ms 551ns 2.13μs 0 0 0 2 B
master OptimizedCharSlice netcoreapp3.1 1.79ms 4.21μs 16.3μs 0 0 0 1 B
master OptimizedCharSlice net472 2.07ms 367ns 1.32μs 0 0 0 85 B
master OptimizedCharSliceWithPool net6.0 856μs 29ns 109ns 0 0 0 4 B
master OptimizedCharSliceWithPool netcoreapp3.1 801μs 71ns 275ns 0 0 0 1 B
master OptimizedCharSliceWithPool net472 1.18ms 110ns 427ns 0 0 0 48 B
#7754 OriginalCharSlice net6.0 1.9ms 6.57μs 23.7μs 0 0 0 640 KB
#7754 OriginalCharSlice netcoreapp3.1 2.11ms 6.27μs 24.3μs 0 0 0 640 KB
#7754 OriginalCharSlice net472 2.67ms 3.09μs 12μs 100 0 0 641.95 KB
#7754 OptimizedCharSlice net6.0 1.43ms 311ns 1.16μs 0 0 0 7 B
#7754 OptimizedCharSlice netcoreapp3.1 1.77ms 198ns 740ns 0 0 0 1 B
#7754 OptimizedCharSlice net472 2.03ms 376ns 1.46μs 0 0 0 73 B
#7754 OptimizedCharSliceWithPool net6.0 802μs 48.9ns 189ns 0 0 0 5 B
#7754 OptimizedCharSliceWithPool netcoreapp3.1 814μs 34.5ns 129ns 0 0 0 0 b
#7754 OptimizedCharSliceWithPool net472 1.14ms 75.8ns 263ns 0 0 0 47 B
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7754

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 41.93 KB 42.14 KB 211 B 0.50%

Fewer allocations 🎉 in #7754

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 56.12 KB 55.71 KB -410 B -0.73%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 698μs 3.39μs 13.6μs 0 0 0 41.63 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 730μs 4.23μs 37.6μs 0 0 0 41.93 KB
master WriteAndFlushEnrichedTraces net472 884μs 4.04μs 15.6μs 8.33 0 0 56.12 KB
#7754 WriteAndFlushEnrichedTraces net6.0 758μs 3.66μs 15.5μs 0 0 0 41.68 KB
#7754 WriteAndFlushEnrichedTraces netcoreapp3.1 778μs 9.19μs 90μs 0 0 0 42.14 KB
#7754 WriteAndFlushEnrichedTraces net472 911μs 2.65μs 10.3μs 8.33 0 0 55.71 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 2μs 3.92ns 15.2ns 0 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 2.52μs 11.9ns 46.3ns 0 0 0 1.02 KB
master ExecuteNonQuery net472 2.9μs 2ns 7.48ns 0.145 0.0145 0 987 B
#7754 ExecuteNonQuery net6.0 1.83μs 4.56ns 17.1ns 0 0 0 1.02 KB
#7754 ExecuteNonQuery netcoreapp3.1 2.7μs 4.59ns 17.8ns 0 0 0 1.02 KB
#7754 ExecuteNonQuery net472 2.93μs 4.98ns 19.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.7μs 2.3ns 8.93ns 0 0 0 1.03 KB
master CallElasticsearch netcoreapp3.1 2.25μs 7.91ns 30.6ns 0 0 0 1.03 KB
master CallElasticsearch net472 3.58μs 5.55ns 21.5ns 0.159 0 0 1.04 KB
master CallElasticsearchAsync net6.0 1.87μs 7.49ns 29ns 0 0 0 1.01 KB
master CallElasticsearchAsync netcoreapp3.1 2.33μs 11ns 42.6ns 0 0 0 1.08 KB
master CallElasticsearchAsync net472 3.68μs 4.81ns 18.6ns 0.165 0 0 1.1 KB
#7754 CallElasticsearch net6.0 1.81μs 5.25ns 20.3ns 0 0 0 1.03 KB
#7754 CallElasticsearch netcoreapp3.1 2.2μs 11ns 50.2ns 0 0 0 1.03 KB
#7754 CallElasticsearch net472 3.63μs 2.35ns 8.81ns 0.163 0 0 1.04 KB
#7754 CallElasticsearchAsync net6.0 1.84μs 7.62ns 29.5ns 0 0 0 1.01 KB
#7754 CallElasticsearchAsync netcoreapp3.1 2.4μs 11.9ns 50.5ns 0 0 0 1.08 KB
#7754 CallElasticsearchAsync net472 3.84μs 10.9ns 42ns 0.169 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.74ns 14.5ns 0 0 0 952 B
master ExecuteAsync netcoreapp3.1 2.36μs 8.18ns 30.6ns 0 0 0 952 B
master ExecuteAsync net472 2.54μs 1.53ns 5.92ns 0.141 0 0 915 B
#7754 ExecuteAsync net6.0 1.91μs 5.71ns 22.1ns 0 0 0 952 B
#7754 ExecuteAsync netcoreapp3.1 2.46μs 6.54ns 25.3ns 0 0 0 952 B
#7754 ExecuteAsync net472 2.55μs 3.71ns 14.4ns 0.141 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.86μs 7.22ns 27.9ns 0 0 0 2.36 KB
master SendAsync netcoreapp3.1 8.6μs 18.5ns 71.7ns 0 0 0 2.9 KB
master SendAsync net472 12.1μs 8.1ns 31.4ns 0.484 0 0 3.18 KB
#7754 SendAsync net6.0 6.92μs 10.2ns 39.4ns 0 0 0 2.36 KB
#7754 SendAsync netcoreapp3.1 8.58μs 19.3ns 74.8ns 0 0 0 2.9 KB
#7754 SendAsync net472 12.1μs 10ns 38.9ns 0.48 0 0 3.18 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7754

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 257.82 KB 276.82 KB 19 KB 7.37%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 278.53 KB 280.61 KB 2.08 KB 0.75%

Fewer allocations 🎉 in #7754

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 46.1 KB 45.18 KB -920 B -2.00%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 272.36 KB 258.08 KB -14.28 KB -5.24%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 46.5μs 519ns 4.96μs 0 0 0 43.1 KB
master StringConcatBenchmark netcoreapp3.1 49.6μs 277ns 2.36μs 0 0 0 46.1 KB
master StringConcatBenchmark net472 58μs 146ns 545ns 0 0 0 57.34 KB
master StringConcatAspectBenchmark net6.0 514μs 1.64μs 5.68μs 0 0 0 257.82 KB
master StringConcatAspectBenchmark netcoreapp3.1 519μs 1.2μs 4.34μs 0 0 0 272.36 KB
master StringConcatAspectBenchmark net472 404μs 2μs 16.5μs 0 0 0 278.53 KB
#7754 StringConcatBenchmark net6.0 45.2μs 243ns 1.33μs 0 0 0 43.2 KB
#7754 StringConcatBenchmark netcoreapp3.1 47.5μs 275ns 2.18μs 0 0 0 45.18 KB
#7754 StringConcatBenchmark net472 56.2μs 297ns 1.43μs 0 0 0 57.34 KB
#7754 StringConcatAspectBenchmark net6.0 468μs 2.14μs 7.72μs 0 0 0 276.82 KB
#7754 StringConcatAspectBenchmark netcoreapp3.1 502μs 1.39μs 5.02μs 0 0 0 258.08 KB
#7754 StringConcatAspectBenchmark net472 408μs 2.33μs 17.9μs 0 0 0 280.61 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.63μs 12.4ns 49.7ns 0 0 0 1.7 KB
master EnrichedLog netcoreapp3.1 3.62μs 16.7ns 64.5ns 0 0 0 1.7 KB
master EnrichedLog net472 4.12μs 4.34ns 16.8ns 0.244 0 0 1.64 KB
#7754 EnrichedLog net6.0 2.61μs 13.3ns 59.4ns 0 0 0 1.7 KB
#7754 EnrichedLog netcoreapp3.1 3.55μs 13.8ns 47.9ns 0 0 0 1.7 KB
#7754 EnrichedLog net472 4μs 2.36ns 8.82ns 0.259 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 127μs 257ns 890ns 0 0 0 4.31 KB
master EnrichedLog netcoreapp3.1 133μs 165ns 596ns 0 0 0 4.31 KB
master EnrichedLog net472 173μs 284ns 1.1μs 0 0 0 4.52 KB
#7754 EnrichedLog net6.0 123μs 33.8ns 131ns 0 0 0 4.31 KB
#7754 EnrichedLog netcoreapp3.1 128μs 52.2ns 188ns 0 0 0 4.31 KB
#7754 EnrichedLog net472 168μs 126ns 437ns 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.13μs 17.6ns 68.1ns 0 0 0 2.26 KB
master EnrichedLog netcoreapp3.1 6.75μs 15.4ns 59.5ns 0 0 0 2.26 KB
master EnrichedLog net472 7.51μs 8.31ns 32.2ns 0.3 0 0 2.08 KB
#7754 EnrichedLog net6.0 4.9μs 9.15ns 35.5ns 0 0 0 2.26 KB
#7754 EnrichedLog netcoreapp3.1 6.79μs 17ns 65.7ns 0 0 0 2.26 KB
#7754 EnrichedLog net472 7.59μs 7.52ns 29.1ns 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.98μs 0.673ns 2.61ns 0 0 0 1.2 KB
master SendReceive netcoreapp3.1 2.65μs 11.8ns 45.6ns 0 0 0 1.2 KB
master SendReceive net472 3.15μs 6.36ns 24.6ns 0.187 0 0 1.2 KB
#7754 SendReceive net6.0 2.02μs 6.93ns 26.8ns 0 0 0 1.2 KB
#7754 SendReceive netcoreapp3.1 2.64μs 11ns 42.5ns 0 0 0 1.2 KB
#7754 SendReceive net472 3.01μs 2.49ns 9.63ns 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.21μs 2.86ns 11.1ns 0 0 0 1.58 KB
master EnrichedLog netcoreapp3.1 5.49μs 16.8ns 65ns 0 0 0 1.63 KB
master EnrichedLog net472 6.45μs 7.3ns 28.3ns 0.292 0 0 2.03 KB
#7754 EnrichedLog net6.0 4.24μs 13.3ns 49.8ns 0 0 0 1.58 KB
#7754 EnrichedLog netcoreapp3.1 5.57μs 11.6ns 43.3ns 0 0 0 1.63 KB
#7754 EnrichedLog net472 6.55μs 8.97ns 34.8ns 0.293 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 790ns 4.27ns 22.2ns 0 0 0 576 B
master StartFinishSpan netcoreapp3.1 965ns 5.37ns 32.7ns 0 0 0 576 B
master StartFinishSpan net472 921ns 0.498ns 1.93ns 0.088 0 0 578 B
master StartFinishScope net6.0 924ns 4.61ns 20.1ns 0 0 0 696 B
master StartFinishScope netcoreapp3.1 1.18μs 6.09ns 30.5ns 0 0 0 696 B
master StartFinishScope net472 1.12μs 0.542ns 2.1ns 0.1 0 0 658 B
#7754 StartFinishSpan net6.0 778ns 3.91ns 18.3ns 0 0 0 576 B
#7754 StartFinishSpan netcoreapp3.1 1.07μs 4.89ns 18.9ns 0 0 0 576 B
#7754 StartFinishSpan net472 931ns 1.14ns 4.4ns 0.0887 0 0 578 B
#7754 StartFinishScope net6.0 916ns 4.65ns 20.3ns 0 0 0 696 B
#7754 StartFinishScope netcoreapp3.1 1.21μs 6.26ns 30ns 0 0 0 696 B
#7754 StartFinishScope net472 1.13μs 1.29ns 5.01ns 0.102 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.11μs 1.63ns 6.32ns 0 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 1.45μs 5ns 18.7ns 0 0 0 696 B
master RunOnMethodBegin net472 1.47μs 1.06ns 4.1ns 0.102 0 0 658 B
#7754 RunOnMethodBegin net6.0 1.06μs 0.671ns 2.6ns 0 0 0 696 B
#7754 RunOnMethodBegin netcoreapp3.1 1.45μs 0.608ns 2.35ns 0 0 0 696 B
#7754 RunOnMethodBegin net472 1.46μs 0.765ns 2.96ns 0.103 0 0 658 B

@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 (7754) - mean (78ms)  : crit, 73, 83
     .   : crit, milestone, 78,
    master - mean (72ms)  : 71, 73
     .   : milestone, 72,

    section Baseline
    This PR (7754) - mean (73ms)  : 69, 76
     .   : milestone, 73,
    master - mean (68ms)  : 67, 70
     .   : milestone, 68,

    section CallTarget+Inlining+NGEN
    This PR (7754) - mean (1,141ms)  : crit, 1037, 1245
     .   : crit, milestone, 1141,
    master - mean (1,048ms)  : 1008, 1088
     .   : milestone, 1048,

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

    section Baseline
    This PR (7754) - mean (123ms)  : 111, 135
     .   : milestone, 123,
    master - mean (106ms)  : 104, 109
     .   : milestone, 106,

    section CallTarget+Inlining+NGEN
    This PR (7754) - mean (796ms)  : 727, 866
     .   : milestone, 796,
    master - mean (767ms)  : 727, 806
     .   : milestone, 767,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7754) - mean (106ms)  : crit, 95, 118
     .   : crit, milestone, 106,
    master - mean (97ms)  : 93, 101
     .   : milestone, 97,

    section Baseline
    This PR (7754) - mean (111ms)  : 97, 125
     .   : milestone, 111,
    master - mean (94ms)  : 92, 97
     .   : milestone, 94,

    section CallTarget+Inlining+NGEN
    This PR (7754) - mean (745ms)  : 689, 800
     .   : milestone, 745,
    master - mean (732ms)  : 663, 801
     .   : milestone, 732,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7754) - mean (100ms)  : 92, 107
     .   : milestone, 100,
    master - mean (124ms)  : 106, 142
     .   : milestone, 124,

    section Baseline
    This PR (7754) - mean (98ms)  : 94, 103
     .   : milestone, 98,
    master - mean (122ms)  : 102, 141
     .   : milestone, 122,

    section CallTarget+Inlining+NGEN
    This PR (7754) - mean (690ms)  : 635, 745
     .   : milestone, 690,
    master - mean (796ms)  : 691, 900
     .   : milestone, 796,

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

    section Baseline
    This PR (7754) - mean (194ms)  : 188, 199
     .   : milestone, 194,
    master - mean (197ms)  : 188, 205
     .   : milestone, 197,

    section CallTarget+Inlining+NGEN
    This PR (7754) - mean (1,173ms)  : 1109, 1238
     .   : milestone, 1173,
    master - mean (1,181ms)  : 1099, 1263
     .   : milestone, 1181,

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

    section Baseline
    This PR (7754) - mean (277ms)  : 273, 281
     .   : milestone, 277,
    master - mean (280ms)  : 271, 290
     .   : milestone, 280,

    section CallTarget+Inlining+NGEN
    This PR (7754) - mean (955ms)  : 907, 1003
     .   : milestone, 955,
    master - mean (973ms)  : 932, 1015
     .   : milestone, 973,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7754) - mean (273ms)  : 265, 282
     .   : milestone, 273,
    master - mean (270ms)  : 265, 275
     .   : milestone, 270,

    section Baseline
    This PR (7754) - mean (272ms)  : 263, 281
     .   : milestone, 272,
    master - mean (270ms)  : 266, 275
     .   : milestone, 270,

    section CallTarget+Inlining+NGEN
    This PR (7754) - mean (934ms)  : 873, 995
     .   : milestone, 934,
    master - mean (938ms)  : 879, 997
     .   : milestone, 938,

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

    section Baseline
    This PR (7754) - mean (274ms)  : 266, 281
     .   : milestone, 274,
    master - mean (268ms)  : 262, 274
     .   : milestone, 268,

    section CallTarget+Inlining+NGEN
    This PR (7754) - mean (859ms)  : 830, 889
     .   : milestone, 859,
    master - mean (857ms)  : 830, 885
     .   : milestone, 857,

Loading

redacted.Should().StartWith("System.AggregateException (Multiple Exceptions) ---> System.Exception" + Environment.NewLine);
redacted.Should().Contain("---> System.Exception", Exactly.Twice());
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

NIT: While flatten should do the job, is it worth to test nested exceptions?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added 👍

Copy link
Collaborator

@NachoEchevarria NachoEchevarria left a comment

Choose a reason for hiding this comment

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

Nice!

@andrewlock andrewlock merged commit febe959 into master Nov 6, 2025
152 checks passed
@andrewlock andrewlock deleted the andrew/exception-redaction-aggregate-exception branch November 6, 2025 08:27
@github-actions github-actions bot added this to the vNext-v3 milestone Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants