-
Notifications
You must be signed in to change notification settings - Fork 151
Fix DatadogLoggingScope sometimes injecting incorrect values for ILogger logs injection
#7880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (7880) and master. ✅ No regressions detected - check the details below Full Metrics ComparisonFakeDbCommand
HttpMessageHandler
Comparison explanationExecution-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:
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 chartsFakeDbCommand (.NET Framework 4.8)gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7880) - mean (75ms) : 68, 81
master - mean (77ms) : 70, 84
section Bailout
This PR (7880) - mean (80ms) : 75, 86
master - mean (80ms) : 75, 84
section CallTarget+Inlining+NGEN
This PR (7880) - mean (1,072ms) : 994, 1149
master - mean (1,068ms) : 1013, 1122
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 (7880) - mean (118ms) : 110, 126
master - mean (120ms) : 112, 127
section Bailout
This PR (7880) - mean (119ms) : 111, 128
master - mean (121ms) : 114, 127
section CallTarget+Inlining+NGEN
This PR (7880) - mean (768ms) : 727, 810
master - mean (773ms) : 733, 813
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7880) - mean (106ms) : 98, 115
master - mean (105ms) : 98, 112
section Bailout
This PR (7880) - mean (107ms) : 99, 116
master - mean (106ms) : 100, 111
section CallTarget+Inlining+NGEN
This PR (7880) - mean (714ms) : 681, 746
master - mean (711ms) : 682, 740
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7880) - mean (104ms) : 95, 113
master - mean (105ms) : 97, 113
section Bailout
This PR (7880) - mean (105ms) : 98, 112
master - mean (105ms) : 100, 111
section CallTarget+Inlining+NGEN
This PR (7880) - mean (696ms) : 653, 739
master - mean (687ms) : 650, 725
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 (7880) - mean (194ms) : 189, 198
master - mean (193ms) : 188, 197
section Bailout
This PR (7880) - mean (197ms) : 194, 200
master - mean (195ms) : 193, 197
section CallTarget+Inlining+NGEN
This PR (7880) - mean (1,133ms) : 1059, 1208
master - mean (1,115ms) : 1043, 1187
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 (7880) - mean (278ms) : 272, 284
master - mean (275ms) : 270, 280
section Bailout
This PR (7880) - mean (279ms) : 272, 285
master - mean (276ms) : 272, 280
section CallTarget+Inlining+NGEN
This PR (7880) - mean (907ms) : 869, 945
master - mean (903ms) : 854, 951
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7880) - mean (271ms) : 267, 275
master - mean (268ms) : 265, 272
section Bailout
This PR (7880) - mean (271ms) : 268, 274
master - mean (269ms) : 264, 274
section CallTarget+Inlining+NGEN
This PR (7880) - mean (881ms) : 846, 916
master - mean (875ms) : 834, 917
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7880) - mean (271ms) : 266, 276
master - mean (269ms) : 264, 274
section Bailout
This PR (7880) - mean (270ms) : 266, 275
master - mean (267ms) : 265, 270
section CallTarget+Inlining+NGEN
This PR (7880) - mean (827ms) : 805, 849
master - mean (822ms) : 802, 841
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #7880 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.ActivityBenchmark - Same speed ✔️ Fewer allocations 🎉
|
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 | 6.14 KB | 6 KB | -142 B | -2.31% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartStopWithChild |
net6.0 | 10.6μs | 59.2ns | 360ns | 0 | 0 | 0 | 5.51 KB |
| master | StartStopWithChild |
netcoreapp3.1 | 14.3μs | 73ns | 350ns | 0 | 0 | 0 | 5.73 KB |
| master | StartStopWithChild |
net472 | 22.9μs | 118ns | 728ns | 0.896 | 0.336 | 0 | 6.14 KB |
| #7880 | StartStopWithChild |
net6.0 | 10.3μs | 55.9ns | 321ns | 0 | 0 | 0 | 5.52 KB |
| #7880 | StartStopWithChild |
netcoreapp3.1 | 13.9μs | 66.9ns | 268ns | 0 | 0 | 0 | 5.7 KB |
| #7880 | StartStopWithChild |
net472 | 22.6μs | 122ns | 734ns | 1.05 | 0.422 | 0.105 | 6 KB |
Benchmarks.Trace.AgentWriterBenchmark - Unknown 🤷 Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| master | WriteAndFlushEnrichedTraces |
net472 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7880 | WriteAndFlushEnrichedTraces |
net6.0 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7880 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
| #7880 | WriteAndFlushEnrichedTraces |
net472 | N/A | N/A | N/A | NaN | NaN | NaN | 0 b |
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.08μs | 5.79ns | 33.3ns | 0 | 0 | 0 | 1.22 KB |
| master | AllCycleSimpleBody |
netcoreapp3.1 | 1.39μs | 7.9ns | 55.9ns | 0 | 0 | 0 | 1.2 KB |
| master | AllCycleSimpleBody |
net472 | 1.11μs | 1.11ns | 4.3ns | 0.194 | 0 | 0 | 1.23 KB |
| master | AllCycleMoreComplexBody |
net6.0 | 7.22μs | 4.09ns | 15.8ns | 0 | 0 | 0 | 4.72 KB |
| master | AllCycleMoreComplexBody |
netcoreapp3.1 | 9.35μs | 43.6ns | 175ns | 0 | 0 | 0 | 4.62 KB |
| master | AllCycleMoreComplexBody |
net472 | 7.58μs | 3.67ns | 14.2ns | 0.718 | 0 | 0 | 4.74 KB |
| master | ObjectExtractorSimpleBody |
net6.0 | 321ns | 1.78ns | 11ns | 0 | 0 | 0 | 280 B |
| master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 405ns | 1.99ns | 8.42ns | 0 | 0 | 0 | 272 B |
| master | ObjectExtractorSimpleBody |
net472 | 299ns | 0.178ns | 0.667ns | 0.0442 | 0 | 0 | 281 B |
| master | ObjectExtractorMoreComplexBody |
net6.0 | 6.27μs | 31.4ns | 137ns | 0 | 0 | 0 | 3.78 KB |
| master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.87μs | 36.9ns | 148ns | 0 | 0 | 0 | 3.69 KB |
| master | ObjectExtractorMoreComplexBody |
net472 | 6.6μs | 1.21ns | 4.53ns | 0.598 | 0 | 0 | 3.8 KB |
| #7880 | AllCycleSimpleBody |
net6.0 | 1.06μs | 6.02ns | 45.9ns | 0 | 0 | 0 | 1.22 KB |
| #7880 | AllCycleSimpleBody |
netcoreapp3.1 | 1.41μs | 7.65ns | 44.6ns | 0 | 0 | 0 | 1.2 KB |
| #7880 | AllCycleSimpleBody |
net472 | 1.04μs | 0.189ns | 0.707ns | 0.193 | 0 | 0 | 1.23 KB |
| #7880 | AllCycleMoreComplexBody |
net6.0 | 7.22μs | 35.5ns | 155ns | 0 | 0 | 0 | 4.72 KB |
| #7880 | AllCycleMoreComplexBody |
netcoreapp3.1 | 8.96μs | 42.6ns | 176ns | 0 | 0 | 0 | 4.62 KB |
| #7880 | AllCycleMoreComplexBody |
net472 | 7.57μs | 2.83ns | 11ns | 0.719 | 0 | 0 | 4.74 KB |
| #7880 | ObjectExtractorSimpleBody |
net6.0 | 326ns | 0.135ns | 0.504ns | 0 | 0 | 0 | 280 B |
| #7880 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 395ns | 2.08ns | 11ns | 0 | 0 | 0 | 272 B |
| #7880 | ObjectExtractorSimpleBody |
net472 | 300ns | 0.417ns | 1.56ns | 0.044 | 0 | 0 | 281 B |
| #7880 | ObjectExtractorMoreComplexBody |
net6.0 | 6.39μs | 5.86ns | 22.7ns | 0 | 0 | 0 | 3.78 KB |
| #7880 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.79μs | 39.9ns | 178ns | 0 | 0 | 0 | 3.69 KB |
| #7880 | ObjectExtractorMoreComplexBody |
net472 | 6.7μs | 4.36ns | 16.9ns | 0.572 | 0 | 0 | 3.8 KB |
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EncodeArgs |
net6.0 | 76.3μs | 214ns | 828ns | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
netcoreapp3.1 | 97.7μs | 24.1ns | 90.3ns | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
net472 | 110μs | 27ns | 105ns | 4.94 | 0 | 0 | 32.51 KB |
| master | EncodeLegacyArgs |
net6.0 | 144μs | 26ns | 101ns | 0 | 0 | 0 | 2.15 KB |
| master | EncodeLegacyArgs |
netcoreapp3.1 | 201μs | 755ns | 2.93μs | 0 | 0 | 0 | 2.15 KB |
| master | EncodeLegacyArgs |
net472 | 265μs | 142ns | 551ns | 0 | 0 | 0 | 2.16 KB |
| #7880 | EncodeArgs |
net6.0 | 76.5μs | 15ns | 52.1ns | 0 | 0 | 0 | 32.4 KB |
| #7880 | EncodeArgs |
netcoreapp3.1 | 96.5μs | 351ns | 1.31μs | 0 | 0 | 0 | 32.4 KB |
| #7880 | EncodeArgs |
net472 | 109μs | 39.2ns | 152ns | 4.92 | 0 | 0 | 32.5 KB |
| #7880 | EncodeLegacyArgs |
net6.0 | 146μs | 26.4ns | 98.8ns | 0 | 0 | 0 | 2.15 KB |
| #7880 | EncodeLegacyArgs |
netcoreapp3.1 | 196μs | 172ns | 666ns | 0 | 0 | 0 | 2.14 KB |
| #7880 | EncodeLegacyArgs |
net472 | 274μs | 508ns | 1.97μs | 0 | 0 | 0 | 2.16 KB |
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7880
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑net6.0
2.83 KB
3.46 KB
624 B
22.03%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑net6.0 | 2.83 KB | 3.46 KB | 624 B | 22.03% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunWafRealisticBenchmark |
net6.0 | 446μs | 2.59μs | 23.2μs | 0 | 0 | 0 | 5.48 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 473μs | 2.77μs | 25.8μs | 0 | 0 | 0 | 4.58 KB |
| master | RunWafRealisticBenchmark |
net472 | 492μs | 356ns | 1.28μs | 0 | 0 | 0 | 0 b |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 321μs | 920ns | 3.19μs | 0 | 0 | 0 | 2.83 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 362μs | 3.19μs | 31.1μs | 0 | 0 | 0 | 2.32 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 368μs | 449ns | 1.68μs | 0 | 0 | 0 | 0 b |
| #7880 | RunWafRealisticBenchmark |
net6.0 | 425μs | 1.5μs | 5.81μs | 0 | 0 | 0 | 5.48 KB |
| #7880 | RunWafRealisticBenchmark |
netcoreapp3.1 | 481μs | 3.31μs | 31.7μs | 0 | 0 | 0 | 4.58 KB |
| #7880 | RunWafRealisticBenchmark |
net472 | 500μs | 356ns | 1.23μs | 0 | 0 | 0 | 0 b |
| #7880 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 330μs | 1.85μs | 11.5μs | 0 | 0 | 0 | 3.46 KB |
| #7880 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 352μs | 3.41μs | 32.9μs | 0 | 0 | 0 | 2.32 KB |
| #7880 | RunWafRealisticBenchmarkWithAttack |
net472 | 378μs | 405ns | 1.51μs | 0 | 0 | 0 | 0 b |
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 | 60.6μs | 36.8ns | 133ns | 0 | 0 | 0 | 14.52 KB |
| master | SendRequest |
netcoreapp3.1 | 72.2μs | 334ns | 1.34μs | 0 | 0 | 0 | 17.42 KB |
| master | SendRequest |
net472 | 0.161ns | 0.00536ns | 0.0208ns | 0 | 0 | 0 | 0 b |
| #7880 | SendRequest |
net6.0 | 61.6μs | 55.1ns | 206ns | 0 | 0 | 0 | 14.52 KB |
| #7880 | SendRequest |
netcoreapp3.1 | 71.7μs | 153ns | 528ns | 0 | 0 | 0 | 17.42 KB |
| #7880 | SendRequest |
net472 | 0.00655ns | 0.00203ns | 0.00786ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #7880
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0
976 B
640 B
-336 B
-34.43%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0
640 B
304 B
-336 B
-52.50%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 | 976 B | 640 B | -336 B | -34.43% |
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 | 640 B | 304 B | -336 B | -52.50% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | OriginalCharSlice |
net6.0 | 1.89ms | 1.31μs | 4.9μs | 0 | 0 | 0 | 640.3 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 3.99ms | 1.21μs | 4.19μs | 0 | 0 | 0 | 640.1 KB |
| master | OriginalCharSlice |
net472 | 2.66ms | 1.44μs | 5.59μs | 0 | 0 | 0 | 647.17 KB |
| master | OptimizedCharSlice |
net6.0 | 1.42ms | 502ns | 1.74μs | 0 | 0 | 0 | 976 B |
| master | OptimizedCharSlice |
netcoreapp3.1 | 2.77ms | 1.17μs | 4.53μs | 0 | 0 | 0 | 104 B |
| master | OptimizedCharSlice |
net472 | 1.92ms | 1.12μs | 4.18μs | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net6.0 | 1.01ms | 744ns | 2.88μs | 0 | 0 | 0 | 640 B |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 1.92ms | 1.72μs | 6.64μs | 0 | 0 | 0 | 104 B |
| master | OptimizedCharSliceWithPool |
net472 | 1.14ms | 273ns | 946ns | 0 | 0 | 0 | 0 b |
| #7880 | OriginalCharSlice |
net6.0 | 1.97ms | 325ns | 1.13μs | 0 | 0 | 0 | 640.64 KB |
| #7880 | OriginalCharSlice |
netcoreapp3.1 | 3.87ms | 392ns | 1.41μs | 0 | 0 | 0 | 640.1 KB |
| #7880 | OriginalCharSlice |
net472 | 2.64ms | 846ns | 3.17μs | 0 | 0 | 0 | 647.17 KB |
| #7880 | OptimizedCharSlice |
net6.0 | 1.48ms | 725ns | 2.71μs | 0 | 0 | 0 | 640 B |
| #7880 | OptimizedCharSlice |
netcoreapp3.1 | 2.79ms | 1.41μs | 5.27μs | 0 | 0 | 0 | 104 B |
| #7880 | OptimizedCharSlice |
net472 | 1.9ms | 740ns | 2.86μs | 0 | 0 | 0 | 0 b |
| #7880 | OptimizedCharSliceWithPool |
net6.0 | 1.03ms | 1.21μs | 4.53μs | 0 | 0 | 0 | 304 B |
| #7880 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 1.89ms | 2.5μs | 9.7μs | 0 | 0 | 0 | 104 B |
| #7880 | OptimizedCharSliceWithPool |
net472 | 1.14ms | 588ns | 2.28μs | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 714μs | 3.63μs | 16.6μs | 0 | 0 | 0 | 42.23 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 746μs | 4.1μs | 24.9μs | 0 | 0 | 0 | 41.86 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 939μs | 4.3μs | 23.2μs | 4.46 | 0 | 0 | 55.79 KB |
| #7880 | WriteAndFlushEnrichedTraces |
net6.0 | 710μs | 2.43μs | 11.4μs | 0 | 0 | 0 | 42.15 KB |
| #7880 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 713μs | 3.65μs | 16.7μs | 0 | 0 | 0 | 41.76 KB |
| #7880 | WriteAndFlushEnrichedTraces |
net472 | 955μs | 4.74μs | 22.2μs | 4.46 | 0 | 0 | 55.87 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 | 8.67ns | 33.6ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.53μs | 5.29ns | 20.5ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.74μs | 3.2ns | 12.4ns | 0.151 | 0 | 0 | 987 B |
| #7880 | ExecuteNonQuery |
net6.0 | 1.95μs | 7.53ns | 29.2ns | 0 | 0 | 0 | 1.02 KB |
| #7880 | ExecuteNonQuery |
netcoreapp3.1 | 2.55μs | 12.9ns | 56.4ns | 0 | 0 | 0 | 1.02 KB |
| #7880 | ExecuteNonQuery |
net472 | 2.75μs | 4.87ns | 18.9ns | 0.153 | 0 | 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.75μs | 9.2ns | 44.1ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 2.26μs | 10.9ns | 45.1ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
net472 | 3.48μs | 1.22ns | 4.56ns | 0.157 | 0 | 0 | 1.04 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.87μs | 7.73ns | 30ns | 0 | 0 | 0 | 1.01 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.41μs | 7.48ns | 25.9ns | 0 | 0 | 0 | 1.08 KB |
| master | CallElasticsearchAsync |
net472 | 3.69μs | 4.57ns | 17.7ns | 0.167 | 0 | 0 | 1.1 KB |
| #7880 | CallElasticsearch |
net6.0 | 1.72μs | 7.72ns | 29.9ns | 0 | 0 | 0 | 1.03 KB |
| #7880 | CallElasticsearch |
netcoreapp3.1 | 2.41μs | 1.15ns | 4.32ns | 0 | 0 | 0 | 1.03 KB |
| #7880 | CallElasticsearch |
net472 | 3.45μs | 2.26ns | 8.74ns | 0.157 | 0 | 0 | 1.04 KB |
| #7880 | CallElasticsearchAsync |
net6.0 | 1.78μs | 0.472ns | 1.77ns | 0 | 0 | 0 | 1.01 KB |
| #7880 | CallElasticsearchAsync |
netcoreapp3.1 | 2.41μs | 11.2ns | 46.3ns | 0 | 0 | 0 | 1.08 KB |
| #7880 | CallElasticsearchAsync |
net472 | 3.63μs | 3.28ns | 12.7ns | 0.165 | 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.92μs | 7.18ns | 27.8ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.45μs | 8.55ns | 33.1ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 2.58μs | 2.98ns | 11.5ns | 0.141 | 0 | 0 | 915 B |
| #7880 | ExecuteAsync |
net6.0 | 1.84μs | 8.8ns | 35.2ns | 0 | 0 | 0 | 952 B |
| #7880 | ExecuteAsync |
netcoreapp3.1 | 2.42μs | 9.29ns | 33.5ns | 0 | 0 | 0 | 952 B |
| #7880 | ExecuteAsync |
net472 | 2.58μs | 1.5ns | 5.79ns | 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 | 7μs | 11.5ns | 44.4ns | 0 | 0 | 0 | 2.36 KB |
| master | SendAsync |
netcoreapp3.1 | 8.7μs | 19.8ns | 76.9ns | 0 | 0 | 0 | 2.9 KB |
| master | SendAsync |
net472 | 12.3μs | 7.96ns | 29.8ns | 0.489 | 0 | 0 | 3.18 KB |
| #7880 | SendAsync |
net6.0 | 6.96μs | 10.2ns | 39.5ns | 0 | 0 | 0 | 2.36 KB |
| #7880 | SendAsync |
netcoreapp3.1 | 8.92μs | 28.4ns | 110ns | 0 | 0 | 0 | 2.9 KB |
| #7880 | SendAsync |
net472 | 12.1μs | 9.92ns | 38.4ns | 0.484 | 0 | 0 | 3.18 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7880
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472
278.53 KB
285.06 KB
6.54 KB
2.35%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
273.14 KB
274.78 KB
1.63 KB
0.60%
Fewer allocations 🎉 in #7880
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1
43.09 KB
42.78 KB
-304 B
-0.71%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0
43.78 KB
43.16 KB
-616 B
-1.41%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
273.29 KB
259.42 KB
-13.86 KB
-5.07%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 | 278.53 KB | 285.06 KB | 6.54 KB | 2.35% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 273.14 KB | 274.78 KB | 1.63 KB | 0.60% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 | 43.09 KB | 42.78 KB | -304 B | -0.71% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 | 43.78 KB | 43.16 KB | -616 B | -1.41% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 273.29 KB | 259.42 KB | -13.86 KB | -5.07% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 45μs | 304ns | 2.83μs | 0 | 0 | 0 | 43.78 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 52.5μs | 503ns | 4.91μs | 0 | 0 | 0 | 43.09 KB |
| master | StringConcatBenchmark |
net472 | 57μs | 278ns | 1.15μs | 0 | 0 | 0 | 57.34 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 460μs | 1.51μs | 8.01μs | 0 | 0 | 0 | 273.29 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 510μs | 2.39μs | 10.7μs | 0 | 0 | 0 | 273.14 KB |
| master | StringConcatAspectBenchmark |
net472 | 411μs | 1.98μs | 14.3μs | 0 | 0 | 0 | 278.53 KB |
| #7880 | StringConcatBenchmark |
net6.0 | 45μs | 265ns | 2.51μs | 0 | 0 | 0 | 43.16 KB |
| #7880 | StringConcatBenchmark |
netcoreapp3.1 | 52.3μs | 472ns | 4.7μs | 0 | 0 | 0 | 42.78 KB |
| #7880 | StringConcatBenchmark |
net472 | 58.4μs | 245ns | 1.01μs | 0 | 0 | 0 | 57.34 KB |
| #7880 | StringConcatAspectBenchmark |
net6.0 | 452μs | 2.17μs | 9.47μs | 0 | 0 | 0 | 259.42 KB |
| #7880 | StringConcatAspectBenchmark |
netcoreapp3.1 | 509μs | 2.05μs | 7.39μs | 0 | 0 | 0 | 274.78 KB |
| #7880 | StringConcatAspectBenchmark |
net472 | 403μs | 1.97μs | 8.35μs | 0 | 0 | 0 | 285.06 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.71μs | 13.2ns | 54.3ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.62μs | 12.5ns | 48.5ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 3.95μs | 6.07ns | 23.5ns | 0.254 | 0 | 0 | 1.64 KB |
| #7880 | EnrichedLog |
net6.0 | 2.68μs | 12.2ns | 48.9ns | 0 | 0 | 0 | 1.7 KB |
| #7880 | EnrichedLog |
netcoreapp3.1 | 3.6μs | 12ns | 46.5ns | 0 | 0 | 0 | 1.7 KB |
| #7880 | EnrichedLog |
net472 | 4.05μs | 3.97ns | 14.9ns | 0.243 | 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 | 78.6ns | 305ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 126μs | 43ns | 161ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 165μs | 56.7ns | 204ns | 0 | 0 | 0 | 4.51 KB |
| #7880 | EnrichedLog |
net6.0 | 125μs | 107ns | 415ns | 0 | 0 | 0 | 4.31 KB |
| #7880 | EnrichedLog |
netcoreapp3.1 | 128μs | 230ns | 862ns | 0 | 0 | 0 | 4.31 KB |
| #7880 | EnrichedLog |
net472 | 167μs | 50.7ns | 183ns | 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.17μs | 21.3ns | 82.6ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 7.06μs | 15.3ns | 57.1ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.73μs | 5.53ns | 21.4ns | 0.307 | 0 | 0 | 2.08 KB |
| #7880 | EnrichedLog |
net6.0 | 4.91μs | 22.7ns | 85.1ns | 0 | 0 | 0 | 2.26 KB |
| #7880 | EnrichedLog |
netcoreapp3.1 | 6.89μs | 26.9ns | 104ns | 0 | 0 | 0 | 2.26 KB |
| #7880 | EnrichedLog |
net472 | 7.81μs | 6.16ns | 23.9ns | 0.312 | 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.15μs | 1.92ns | 7.2ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
netcoreapp3.1 | 2.65μs | 12.6ns | 52ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
net472 | 3.11μs | 5.92ns | 22.9ns | 0.185 | 0 | 0 | 1.2 KB |
| #7880 | SendReceive |
net6.0 | 1.99μs | 10.8ns | 60.2ns | 0 | 0 | 0 | 1.2 KB |
| #7880 | SendReceive |
netcoreapp3.1 | 2.55μs | 6.69ns | 25.9ns | 0 | 0 | 0 | 1.2 KB |
| #7880 | SendReceive |
net472 | 3.11μs | 2.13ns | 7.67ns | 0.185 | 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.36μs | 11.4ns | 44.1ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.82μs | 16.5ns | 64ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.56μs | 9.44ns | 36.5ns | 0.299 | 0 | 0 | 2.03 KB |
| #7880 | EnrichedLog |
net6.0 | 4.41μs | 2.42ns | 9.05ns | 0 | 0 | 0 | 1.58 KB |
| #7880 | EnrichedLog |
netcoreapp3.1 | 6.04μs | 8.62ns | 33.4ns | 0 | 0 | 0 | 1.63 KB |
| #7880 | EnrichedLog |
net472 | 6.44μs | 3.84ns | 14.9ns | 0.321 | 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 | 782ns | 3.87ns | 16.4ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 984ns | 4.62ns | 17.9ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 917ns | 0.137ns | 0.514ns | 0.0879 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 932ns | 4.67ns | 20.9ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.17μs | 5.15ns | 19.3ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 1.13μs | 0.23ns | 0.86ns | 0.102 | 0 | 0 | 658 B |
| master | StartFinishTwoScopes |
net6.0 | 1.73μs | 9.05ns | 43.4ns | 0 | 0 | 0 | 1.19 KB |
| master | StartFinishTwoScopes |
netcoreapp3.1 | 2.24μs | 11.4ns | 54.5ns | 0 | 0 | 0 | 1.19 KB |
| master | StartFinishTwoScopes |
net472 | 2.2μs | 1.84ns | 6.89ns | 0.166 | 0 | 0 | 1.08 KB |
| #7880 | StartFinishSpan |
net6.0 | 834ns | 3.91ns | 16.1ns | 0 | 0 | 0 | 576 B |
| #7880 | StartFinishSpan |
netcoreapp3.1 | 971ns | 4.8ns | 20.9ns | 0 | 0 | 0 | 576 B |
| #7880 | StartFinishSpan |
net472 | 890ns | 0.0481ns | 0.174ns | 0.0893 | 0 | 0 | 578 B |
| #7880 | StartFinishScope |
net6.0 | 971ns | 4.6ns | 17.8ns | 0 | 0 | 0 | 696 B |
| #7880 | StartFinishScope |
netcoreapp3.1 | 1.14μs | 5.2ns | 20.8ns | 0 | 0 | 0 | 696 B |
| #7880 | StartFinishScope |
net472 | 1.1μs | 0.662ns | 2.56ns | 0.104 | 0 | 0 | 658 B |
| #7880 | StartFinishTwoScopes |
net6.0 | 1.77μs | 9.04ns | 42.4ns | 0 | 0 | 0 | 1.19 KB |
| #7880 | StartFinishTwoScopes |
netcoreapp3.1 | 2.19μs | 10.3ns | 38.4ns | 0 | 0 | 0 | 1.19 KB |
| #7880 | StartFinishTwoScopes |
net472 | 2.1μs | 2.92ns | 11.3ns | 0.167 | 0 | 0 | 1.08 KB |
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.1μs | 1.17ns | 4.52ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.42μs | 7.26ns | 33.3ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.43μs | 1.4ns | 5.43ns | 0.101 | 0 | 0 | 658 B |
| #7880 | RunOnMethodBegin |
net6.0 | 1.07μs | 5.34ns | 22.6ns | 0 | 0 | 0 | 696 B |
| #7880 | RunOnMethodBegin |
netcoreapp3.1 | 1.44μs | 7.19ns | 31.3ns | 0 | 0 | 0 | 696 B |
| #7880 | RunOnMethodBegin |
net472 | 1.42μs | 1.13ns | 4.23ns | 0.099 | 0 | 0 | 658 B |
Summary of changes
Fixes a bug where
ILoggerlogs injection injects the wrong values when a customer changes service/env/version using manual instrumentation.Reason for change
This has been a bug for a long time. Basically we cache a
DatadogLoggingScopeinstance on app startup, and then we always use it for injection. If the settings change, we didn't refresh this value, and so would inject the wrong settings. A unit test confirmed this behaviour.Implementation details
I opted for a simple fix for now, especially seeing as this hasn't been flagged as a bug in escalations etc
MutableSettingsfor the trace on theDatadogLoggingScopeAddScope, check if the currentMutableSettingsmatch the ones for the provided scopeOverall, this works, as long as changes are one way, i.e. we don't have much overlap of traces with different MutableSettings. This probably won't be a problem, hence why I took this approach, but it feels a bit hacky.
The other option is to expose the
_cachedFormaton MutableSettings orPerTraceSettingsdirectly instead, and then haveDatadogLoggingScopegrab the ambientCurrentPerTraceSettings.Settingsvalue. This is a bit neater in that it removes the chance of ping-pong between logging scope instances if there are overlapping traces, but it's also a bit meh because it's moving very integration-specific stuff into somewhere more "global". But maybe this is just a facility we _should create 🤷♂️ What do people think?Test coverage
Added unit tests. They fail before this PR, and pass afterwards
Other details
Noticed while I was looking for any fallout from #7695