-
Notifications
You must be signed in to change notification settings - Fork 151
[WIP] [Azure Functions] Fix span parenting for isolated functions with ASP.NET Core integration #7628
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 (7628) 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 (7628) - mean (78ms) : 70, 86
master - mean (77ms) : 71, 84
section Bailout
This PR (7628) - mean (81ms) : 73, 88
master - mean (80ms) : 75, 85
section CallTarget+Inlining+NGEN
This PR (7628) - mean (1,099ms) : 984, 1213
master - mean (1,080ms) : 989, 1172
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 (7628) - mean (120ms) : 112, 128
master - mean (119ms) : 109, 129
section Bailout
This PR (7628) - mean (123ms) : 113, 133
master - mean (122ms) : 113, 131
section CallTarget+Inlining+NGEN
This PR (7628) - mean (772ms) : 725, 820
master - mean (773ms) : 727, 820
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7628) - mean (109ms) : 99, 119
master - mean (109ms) : 98, 119
section Bailout
This PR (7628) - mean (110ms) : 103, 117
master - mean (109ms) : 100, 118
section CallTarget+Inlining+NGEN
This PR (7628) - mean (721ms) : 672, 769
master - mean (727ms) : 686, 769
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7628) - mean (106ms) : 96, 117
master - mean (106ms) : 99, 114
section Bailout
This PR (7628) - mean (107ms) : 98, 116
master - mean (108ms) : 98, 118
section CallTarget+Inlining+NGEN
This PR (7628) - mean (691ms) : 654, 727
master - mean (702ms) : 666, 739
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 (7628) - mean (200ms) : 193, 208
master - mean (195ms) : 191, 199
section Bailout
This PR (7628) - mean (201ms) : 196, 206
master - mean (200ms) : 196, 204
section CallTarget+Inlining+NGEN
This PR (7628) - mean (1,125ms) : 1060, 1189
master - mean (1,127ms) : 1056, 1197
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 (7628) - mean (282ms) : 276, 289
master - mean (279ms) : 273, 286
section Bailout
This PR (7628) - mean (286ms) : 278, 293
master - mean (282ms) : 272, 292
section CallTarget+Inlining+NGEN
This PR (7628) - mean (925ms) : 884, 966
master - mean (922ms) : 875, 968
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7628) - mean (278ms) : 266, 290
master - mean (272ms) : 266, 278
section Bailout
This PR (7628) - mean (277ms) : 270, 284
master - mean (272ms) : 269, 274
section CallTarget+Inlining+NGEN
This PR (7628) - mean (905ms) : 851, 960
master - mean (902ms) : 854, 950
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7628) - mean (272ms) : 267, 278
master - mean (272ms) : 265, 278
section Bailout
This PR (7628) - mean (275ms) : 268, 282
master - mean (273ms) : 267, 279
section CallTarget+Inlining+NGEN
This PR (7628) - mean (832ms) : 808, 856
master - mean (831ms) : 806, 856
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
12a23e2 to
0c87ab6
Compare
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #7628 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 ✔️ More allocations
|
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 | 6.09 KB | 6.12 KB | 33 B | 0.54% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartStopWithChild |
net6.0 | 10.6μs | 59.8ns | 410ns | 0 | 0 | 0 | 5.49 KB |
| master | StartStopWithChild |
netcoreapp3.1 | 13.7μs | 72.7ns | 364ns | 0 | 0 | 0 | 5.7 KB |
| master | StartStopWithChild |
net472 | 22.2μs | 124ns | 830ns | 0.874 | 0.219 | 0 | 6.09 KB |
| #7628 | StartStopWithChild |
net6.0 | 10.8μs | 56.6ns | 283ns | 0 | 0 | 0 | 5.51 KB |
| #7628 | StartStopWithChild |
netcoreapp3.1 | 14.1μs | 53.2ns | 206ns | 0 | 0 | 0 | 5.7 KB |
| #7628 | StartStopWithChild |
net472 | 22.2μs | 121ns | 674ns | 0.876 | 0.219 | 0 | 6.12 KB |
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #7628
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1
2.71 KB
2.7 KB
-15 B
-0.55%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 | 2.71 KB | 2.7 KB | -15 B | -0.55% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 939μs | 367ns | 1.42μs | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.03ms | 552ns | 2.06μs | 0 | 0 | 0 | 2.71 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 1.2ms | 125ns | 484ns | 0 | 0 | 0 | 3.31 KB |
| #7628 | WriteAndFlushEnrichedTraces |
net6.0 | 934μs | 263ns | 1.02μs | 0 | 0 | 0 | 2.71 KB |
| #7628 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.02ms | 50.4ns | 195ns | 0 | 0 | 0 | 2.7 KB |
| #7628 | WriteAndFlushEnrichedTraces |
net472 | 1.19ms | 103ns | 397ns | 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.12μs | 0.877ns | 3.4ns | 0 | 0 | 0 | 1.22 KB |
| master | AllCycleSimpleBody |
netcoreapp3.1 | 1.42μs | 7.76ns | 43.9ns | 0 | 0 | 0 | 1.2 KB |
| master | AllCycleSimpleBody |
net472 | 1.02μs | 2.6ns | 10.1ns | 0.192 | 0 | 0 | 1.23 KB |
| master | AllCycleMoreComplexBody |
net6.0 | 7.24μs | 32.3ns | 125ns | 0 | 0 | 0 | 4.72 KB |
| master | AllCycleMoreComplexBody |
netcoreapp3.1 | 9.06μs | 43.5ns | 179ns | 0 | 0 | 0 | 4.62 KB |
| master | AllCycleMoreComplexBody |
net472 | 7.57μs | 4.62ns | 17.9ns | 0.721 | 0 | 0 | 4.74 KB |
| master | ObjectExtractorSimpleBody |
net6.0 | 326ns | 1.75ns | 9.43ns | 0 | 0 | 0 | 280 B |
| master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 418ns | 2.38ns | 15.9ns | 0 | 0 | 0 | 272 B |
| master | ObjectExtractorSimpleBody |
net472 | 298ns | 0.0238ns | 0.0857ns | 0.0439 | 0 | 0 | 281 B |
| master | ObjectExtractorMoreComplexBody |
net6.0 | 6.34μs | 29.8ns | 115ns | 0 | 0 | 0 | 3.78 KB |
| master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.91μs | 36.3ns | 141ns | 0 | 0 | 0 | 3.69 KB |
| master | ObjectExtractorMoreComplexBody |
net472 | 6.7μs | 9.57ns | 37.1ns | 0.6 | 0 | 0 | 3.8 KB |
| #7628 | AllCycleSimpleBody |
net6.0 | 1.09μs | 6.03ns | 38.6ns | 0 | 0 | 0 | 1.22 KB |
| #7628 | AllCycleSimpleBody |
netcoreapp3.1 | 1.41μs | 7.46ns | 38.1ns | 0 | 0 | 0 | 1.2 KB |
| #7628 | AllCycleSimpleBody |
net472 | 1.01μs | 0.333ns | 1.25ns | 0.191 | 0 | 0 | 1.23 KB |
| #7628 | AllCycleMoreComplexBody |
net6.0 | 7.16μs | 35.4ns | 158ns | 0 | 0 | 0 | 4.72 KB |
| #7628 | AllCycleMoreComplexBody |
netcoreapp3.1 | 9.27μs | 28ns | 105ns | 0 | 0 | 0 | 4.62 KB |
| #7628 | AllCycleMoreComplexBody |
net472 | 7.59μs | 2.68ns | 10.4ns | 0.724 | 0 | 0 | 4.74 KB |
| #7628 | ObjectExtractorSimpleBody |
net6.0 | 316ns | 1.58ns | 7.24ns | 0 | 0 | 0 | 280 B |
| #7628 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 392ns | 2.23ns | 14.9ns | 0 | 0 | 0 | 272 B |
| #7628 | ObjectExtractorSimpleBody |
net472 | 303ns | 0.0428ns | 0.16ns | 0.044 | 0 | 0 | 281 B |
| #7628 | ObjectExtractorMoreComplexBody |
net6.0 | 6.32μs | 30.1ns | 124ns | 0 | 0 | 0 | 3.78 KB |
| #7628 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.74μs | 38.9ns | 165ns | 0 | 0 | 0 | 3.69 KB |
| #7628 | ObjectExtractorMoreComplexBody |
net472 | 6.7μs | 2.77ns | 10.7ns | 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 | 24ns | 89.7ns | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
netcoreapp3.1 | 96.2μs | 276ns | 1.07μs | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
net472 | 118μs | 17.2ns | 66.5ns | 4.69 | 0 | 0 | 32.5 KB |
| master | EncodeLegacyArgs |
net6.0 | 147μs | 38.7ns | 145ns | 0 | 0 | 0 | 2.15 KB |
| master | EncodeLegacyArgs |
netcoreapp3.1 | 199μs | 348ns | 1.35μs | 0 | 0 | 0 | 2.14 KB |
| master | EncodeLegacyArgs |
net472 | 267μs | 28ns | 108ns | 0 | 0 | 0 | 2.16 KB |
| #7628 | EncodeArgs |
net6.0 | 76.3μs | 23.2ns | 83.8ns | 0 | 0 | 0 | 32.4 KB |
| #7628 | EncodeArgs |
netcoreapp3.1 | 97.6μs | 207ns | 773ns | 0 | 0 | 0 | 32.4 KB |
| #7628 | EncodeArgs |
net472 | 118μs | 69.7ns | 251ns | 4.74 | 0 | 0 | 32.51 KB |
| #7628 | EncodeLegacyArgs |
net6.0 | 146μs | 59.5ns | 230ns | 0 | 0 | 0 | 2.15 KB |
| #7628 | EncodeLegacyArgs |
netcoreapp3.1 | 198μs | 156ns | 604ns | 0 | 0 | 0 | 2.14 KB |
| #7628 | EncodeLegacyArgs |
net472 | 264μs | 33.2ns | 115ns | 0 | 0 | 0 | 2.16 KB |
Benchmarks.Trace.Asm.AppSecWafBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #7628
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1
1.993
298,208.84
594,258.85
bimodal
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 | 1.993 | 298,208.84 | 594,258.85 | bimodal |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunWafRealisticBenchmark |
net6.0 | 397μs | 76ns | 274ns | 0 | 0 | 0 | 4.55 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 411μs | 285ns | 1.07μs | 0 | 0 | 0 | 4.48 KB |
| master | RunWafRealisticBenchmark |
net472 | 427μs | 63.3ns | 245ns | 0 | 0 | 0 | 4.66 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 284μs | 41.3ns | 160ns | 0 | 0 | 0 | 2.24 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 298μs | 62.7ns | 226ns | 0 | 0 | 0 | 2.22 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 311μs | 21.9ns | 85ns | 0 | 0 | 0 | 2.29 KB |
| #7628 | RunWafRealisticBenchmark |
net6.0 | 395μs | 74.9ns | 280ns | 0 | 0 | 0 | 4.55 KB |
| #7628 | RunWafRealisticBenchmark |
netcoreapp3.1 | 411μs | 72ns | 249ns | 0 | 0 | 0 | 4.48 KB |
| #7628 | RunWafRealisticBenchmark |
net472 | 433μs | 40.7ns | 158ns | 0 | 0 | 0 | 4.68 KB |
| #7628 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 286μs | 50.7ns | 190ns | 0 | 0 | 0 | 2.24 KB |
| #7628 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 614μs | 11.6μs | 116μs | 0 | 0 | 0 | 2.22 KB |
| #7628 | RunWafRealisticBenchmarkWithAttack |
net472 | 310μs | 17.9ns | 64.6ns | 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μs | 72.2ns | 279ns | 0 | 0 | 0 | 14.52 KB |
| master | SendRequest |
netcoreapp3.1 | 70.8μs | 66ns | 247ns | 0 | 0 | 0 | 17.42 KB |
| master | SendRequest |
net472 | 0.00512ns | 0.00217ns | 0.00841ns | 0 | 0 | 0 | 0 b |
| #7628 | SendRequest |
net6.0 | 61.1μs | 50.4ns | 189ns | 0 | 0 | 0 | 14.52 KB |
| #7628 | SendRequest |
netcoreapp3.1 | 71.6μs | 147ns | 548ns | 0 | 0 | 0 | 17.42 KB |
| #7628 | SendRequest |
net472 | 0.00526ns | 0.00196ns | 0.00759ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | OriginalCharSlice |
net6.0 | 1.96ms | 5.54μs | 21.4μs | 0 | 0 | 0 | 640.01 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 2.08ms | 2.29μs | 8.25μs | 0 | 0 | 0 | 640 KB |
| master | OriginalCharSlice |
net472 | 2.72ms | 130ns | 504ns | 100 | 0 | 0 | 641.95 KB |
| master | OptimizedCharSlice |
net6.0 | 1.35ms | 290ns | 1.05μs | 0 | 0 | 0 | 7 B |
| master | OptimizedCharSlice |
netcoreapp3.1 | 1.66ms | 498ns | 1.93μs | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSlice |
net472 | 1.99ms | 418ns | 1.62μs | 0 | 0 | 0 | 73 B |
| master | OptimizedCharSliceWithPool |
net6.0 | 849μs | 60.4ns | 218ns | 0 | 0 | 0 | 4 B |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 809μs | 37.6ns | 136ns | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net472 | 1.15ms | 124ns | 482ns | 0 | 0 | 0 | 47 B |
| #7628 | OriginalCharSlice |
net6.0 | 1.93ms | 273ns | 1.06μs | 0 | 0 | 0 | 640.01 KB |
| #7628 | OriginalCharSlice |
netcoreapp3.1 | 2.16ms | 4.14μs | 14.9μs | 0 | 0 | 0 | 640 KB |
| #7628 | OriginalCharSlice |
net472 | 2.68ms | 80.8ns | 291ns | 100 | 0 | 0 | 641.95 KB |
| #7628 | OptimizedCharSlice |
net6.0 | 1.39ms | 146ns | 564ns | 0 | 0 | 0 | 7 B |
| #7628 | OptimizedCharSlice |
netcoreapp3.1 | 1.67ms | 656ns | 2.54μs | 0 | 0 | 0 | 1 B |
| #7628 | OptimizedCharSlice |
net472 | 1.95ms | 381ns | 1.47μs | 0 | 0 | 0 | 73 B |
| #7628 | OptimizedCharSliceWithPool |
net6.0 | 800μs | 58.8ns | 212ns | 0 | 0 | 0 | 4 B |
| #7628 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 859μs | 111ns | 428ns | 0 | 0 | 0 | 0 b |
| #7628 | OptimizedCharSliceWithPool |
net472 | 1.15ms | 91.1ns | 353ns | 0 | 0 | 0 | 47 B |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Faster 🎉 More allocations ⚠️
Faster 🎉 in #7628
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0
1.197
720,929.61
602,355.80
More allocations ⚠️ in #7628
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
56.5 KB
56.87 KB
363 B
0.64%
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0
41.54 KB
41.81 KB
263 B
0.63%
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 1.197 | 720,929.61 | 602,355.80 |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 56.5 KB | 56.87 KB | 363 B | 0.64% |
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 41.54 KB | 41.81 KB | 263 B | 0.63% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 716μs | 3.07μs | 11.9μs | 0 | 0 | 0 | 41.54 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 755μs | 4.85μs | 46.5μs | 0 | 0 | 0 | 42.07 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 866μs | 3.74μs | 14μs | 8.93 | 0 | 0 | 56.5 KB |
| #7628 | WriteAndFlushEnrichedTraces |
net6.0 | 602μs | 1.28μs | 4.96μs | 0 | 0 | 0 | 41.81 KB |
| #7628 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 743μs | 2.02μs | 7.57μs | 0 | 0 | 0 | 42.02 KB |
| #7628 | WriteAndFlushEnrichedTraces |
net472 | 888μs | 4.09μs | 15.8μs | 8.33 | 0 | 0 | 56.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.89μs | 1.66ns | 6.43ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.62μs | 8.01ns | 31ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 3.03μs | 3.89ns | 15.1ns | 0.152 | 0.0152 | 0 | 987 B |
| #7628 | ExecuteNonQuery |
net6.0 | 1.92μs | 4.98ns | 19.3ns | 0 | 0 | 0 | 1.02 KB |
| #7628 | ExecuteNonQuery |
netcoreapp3.1 | 2.62μs | 8.81ns | 33ns | 0 | 0 | 0 | 1.02 KB |
| #7628 | ExecuteNonQuery |
net472 | 3.14μs | 4.11ns | 15.9ns | 0.156 | 0.0156 | 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.72μs | 0.731ns | 2.83ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 2.29μs | 7.79ns | 30.2ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
net472 | 3.59μs | 6.94ns | 26.9ns | 0.16 | 0 | 0 | 1.04 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.82μs | 5.68ns | 22ns | 0 | 0 | 0 | 1.01 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.44μs | 11.9ns | 51.9ns | 0 | 0 | 0 | 1.08 KB |
| master | CallElasticsearchAsync |
net472 | 3.79μs | 4.34ns | 16.8ns | 0.17 | 0 | 0 | 1.1 KB |
| #7628 | CallElasticsearch |
net6.0 | 1.82μs | 8.05ns | 31.2ns | 0 | 0 | 0 | 1.03 KB |
| #7628 | CallElasticsearch |
netcoreapp3.1 | 2.33μs | 11.1ns | 44.2ns | 0 | 0 | 0 | 1.03 KB |
| #7628 | CallElasticsearch |
net472 | 3.58μs | 3.18ns | 12.3ns | 0.16 | 0 | 0 | 1.04 KB |
| #7628 | CallElasticsearchAsync |
net6.0 | 1.75μs | 7.43ns | 27.8ns | 0 | 0 | 0 | 1.01 KB |
| #7628 | CallElasticsearchAsync |
netcoreapp3.1 | 2.38μs | 9.36ns | 36.3ns | 0 | 0 | 0 | 1.08 KB |
| #7628 | CallElasticsearchAsync |
net472 | 3.82μs | 3.55ns | 13.7ns | 0.172 | 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 | 8.98ns | 35.9ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.44μs | 1.79ns | 6.68ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 2.58μs | 4.33ns | 16.8ns | 0.141 | 0 | 0 | 915 B |
| #7628 | ExecuteAsync |
net6.0 | 1.85μs | 9.38ns | 41.9ns | 0 | 0 | 0 | 952 B |
| #7628 | ExecuteAsync |
netcoreapp3.1 | 2.46μs | 4.27ns | 16.6ns | 0 | 0 | 0 | 952 B |
| #7628 | ExecuteAsync |
net472 | 2.57μs | 0.688ns | 2.67ns | 0.142 | 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.77μs | 4.53ns | 16.9ns | 0 | 0 | 0 | 2.36 KB |
| master | SendAsync |
netcoreapp3.1 | 8.65μs | 27.9ns | 108ns | 0 | 0 | 0 | 2.9 KB |
| master | SendAsync |
net472 | 12.6μs | 5.72ns | 20.6ns | 0.505 | 0 | 0 | 3.18 KB |
| #7628 | SendAsync |
net6.0 | 7μs | 21ns | 81.3ns | 0 | 0 | 0 | 2.36 KB |
| #7628 | SendAsync |
netcoreapp3.1 | 8.49μs | 8.48ns | 31.7ns | 0 | 0 | 0 | 2.9 KB |
| #7628 | SendAsync |
net472 | 12.3μs | 8.04ns | 30.1ns | 0.488 | 0 | 0 | 3.18 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7628
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472
274.06 KB
294.91 KB
20.85 KB
7.61%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
257.18 KB
264.24 KB
7.06 KB
2.75%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
276.89 KB
278.37 KB
1.48 KB
0.53%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 | 274.06 KB | 294.91 KB | 20.85 KB | 7.61% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 257.18 KB | 264.24 KB | 7.06 KB | 2.75% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 276.89 KB | 278.37 KB | 1.48 KB | 0.53% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 46.5μs | 276ns | 2.66μs | 0 | 0 | 0 | 43.97 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 49.8μs | 257ns | 1.63μs | 0 | 0 | 0 | 43.22 KB |
| master | StringConcatBenchmark |
net472 | 57.8μs | 286ns | 1.18μs | 0 | 0 | 0 | 57.34 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 469μs | 1.99μs | 7.18μs | 0 | 0 | 0 | 276.89 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 524μs | 2.19μs | 7.91μs | 0 | 0 | 0 | 257.18 KB |
| master | StringConcatAspectBenchmark |
net472 | 410μs | 1.88μs | 9.78μs | 0 | 0 | 0 | 274.06 KB |
| #7628 | StringConcatBenchmark |
net6.0 | 45.5μs | 249ns | 1.99μs | 0 | 0 | 0 | 43.76 KB |
| #7628 | StringConcatBenchmark |
netcoreapp3.1 | 51.1μs | 306ns | 2.95μs | 0 | 0 | 0 | 43.18 KB |
| #7628 | StringConcatBenchmark |
net472 | 56.6μs | 286ns | 1.21μs | 0 | 0 | 0 | 57.34 KB |
| #7628 | StringConcatAspectBenchmark |
net6.0 | 489μs | 1.87μs | 6.74μs | 0 | 0 | 0 | 278.37 KB |
| #7628 | StringConcatAspectBenchmark |
netcoreapp3.1 | 540μs | 1.94μs | 7.01μs | 0 | 0 | 0 | 264.24 KB |
| #7628 | StringConcatAspectBenchmark |
net472 | 411μs | 2.1μs | 10.3μ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.7μs | 14.6ns | 83.7ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.63μs | 12.2ns | 47.3ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 4.01μs | 2.3ns | 8.91ns | 0.26 | 0 | 0 | 1.64 KB |
| #7628 | EnrichedLog |
net6.0 | 2.64μs | 13.5ns | 64.8ns | 0 | 0 | 0 | 1.7 KB |
| #7628 | EnrichedLog |
netcoreapp3.1 | 3.68μs | 13.7ns | 53.1ns | 0 | 0 | 0 | 1.7 KB |
| #7628 | EnrichedLog |
net472 | 3.86μs | 2.67ns | 10.3ns | 0.25 | 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 | 49.2ns | 190ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 128μs | 209ns | 809ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 169μs | 75.6ns | 293ns | 0 | 0 | 0 | 4.52 KB |
| #7628 | EnrichedLog |
net6.0 | 123μs | 39ns | 146ns | 0 | 0 | 0 | 4.31 KB |
| #7628 | EnrichedLog |
netcoreapp3.1 | 127μs | 68.6ns | 247ns | 0 | 0 | 0 | 4.31 KB |
| #7628 | EnrichedLog |
net472 | 167μs | 51ns | 184ns | 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.88μs | 20.8ns | 80.8ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.8μs | 17.1ns | 66.3ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.49μs | 4.38ns | 17ns | 0.3 | 0 | 0 | 2.08 KB |
| #7628 | EnrichedLog |
net6.0 | 4.96μs | 24.2ns | 99.6ns | 0 | 0 | 0 | 2.26 KB |
| #7628 | EnrichedLog |
netcoreapp3.1 | 6.82μs | 19.3ns | 72.1ns | 0 | 0 | 0 | 2.26 KB |
| #7628 | EnrichedLog |
net472 | 7.58μs | 4.74ns | 17.1ns | 0.304 | 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.94μs | 10.2ns | 50ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
netcoreapp3.1 | 2.56μs | 12.5ns | 48.4ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
net472 | 3.01μs | 3.07ns | 11.5ns | 0.183 | 0 | 0 | 1.2 KB |
| #7628 | SendReceive |
net6.0 | 1.92μs | 9.18ns | 36.7ns | 0 | 0 | 0 | 1.2 KB |
| #7628 | SendReceive |
netcoreapp3.1 | 2.65μs | 13.9ns | 69.6ns | 0 | 0 | 0 | 1.2 KB |
| #7628 | SendReceive |
net472 | 3.02μs | 4.12ns | 16ns | 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.34μs | 6.48ns | 25.1ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.54μs | 17.2ns | 66.8ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.83μs | 7.27ns | 28.2ns | 0.307 | 0 | 0 | 2.03 KB |
| #7628 | EnrichedLog |
net6.0 | 4.46μs | 19.9ns | 74.4ns | 0 | 0 | 0 | 1.58 KB |
| #7628 | EnrichedLog |
netcoreapp3.1 | 5.57μs | 18.2ns | 70.7ns | 0 | 0 | 0 | 1.63 KB |
| #7628 | EnrichedLog |
net472 | 6.72μs | 8.59ns | 33.3ns | 0.303 | 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 | 769ns | 4.17ns | 25ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 961ns | 5.1ns | 25.5ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 974ns | 0.344ns | 1.33ns | 0.0883 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 902ns | 4.53ns | 20.7ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.17μs | 5.91ns | 27.7ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 1.18μs | 0.388ns | 1.5ns | 0.0996 | 0 | 0 | 658 B |
| #7628 | StartFinishSpan |
net6.0 | 768ns | 3.11ns | 11.6ns | 0 | 0 | 0 | 576 B |
| #7628 | StartFinishSpan |
netcoreapp3.1 | 972ns | 4.25ns | 16.4ns | 0 | 0 | 0 | 576 B |
| #7628 | StartFinishSpan |
net472 | 983ns | 0.154ns | 0.596ns | 0.087 | 0 | 0 | 578 B |
| #7628 | StartFinishScope |
net6.0 | 924ns | 4.87ns | 24.4ns | 0 | 0 | 0 | 696 B |
| #7628 | StartFinishScope |
netcoreapp3.1 | 1.22μs | 5.86ns | 25.5ns | 0 | 0 | 0 | 696 B |
| #7628 | StartFinishScope |
net472 | 1.17μs | 0.87ns | 3.37ns | 0.0995 | 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.07μs | 5.21ns | 22.1ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.5μs | 7.08ns | 30ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.43μs | 0.251ns | 0.938ns | 0.1 | 0 | 0 | 658 B |
| #7628 | RunOnMethodBegin |
net6.0 | 1.11μs | 0.644ns | 2.5ns | 0 | 0 | 0 | 696 B |
| #7628 | RunOnMethodBegin |
netcoreapp3.1 | 1.42μs | 6.99ns | 31.3ns | 0 | 0 | 0 | 696 B |
| #7628 | RunOnMethodBegin |
net472 | 1.48μs | 0.707ns | 2.74ns | 0.103 | 0 | 0 | 658 B |
9dd669c to
27ba999
Compare
27ba999 to
584134a
Compare
24a8537 to
aae2cfb
Compare
974a81e to
613d6bb
Compare
Add aas.function.process tag to identify whether spans originate from the host or worker process in Azure Functions isolated mode. This helps differentiate between the two processes that exist in the isolated worker model. Changes: - Add AzureFunctionsProcess tag constant with possible values: host, worker - Add IsAzureFunctionsIsolated() helper method to detect isolated functions - Update SpanMessagePackFormatter to include the tag for isolated functions - Tag is only added for isolated Azure Functions (not in-process functions) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Merge APMSVLS-58-solution.md into main investigation doc - Organize traces into phase directories (1-original, 2-after-observer) - Document trace evolution before/after enabling AspNetCoreDiagnosticObserver - Clarify current issues: wrong parent and unnecessary host spans - Remove obsolete baseline trace files 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Add captured trace files from before enabling AspNetCoreDiagnosticObserver in worker process, showing baseline behavior where: - No aspnet_core.request span exists in worker - Worker's azure_functions.invoke parented to host's root span - Host creates unnecessary azure_functions.invoke and http.request spans Update investigation doc with detailed trace analysis and clarify goal: make worker's azure_functions.invoke a child of aspnet_core.request span. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Replace "Next Steps" with concrete implementation plan using HttpContext.Items as bridge between ASP.NET Core and Azure Functions middleware. Includes specific file locations and fallback approaches. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
AsyncLocal context doesn't flow through Azure Functions middleware, causing worker's azure_functions.invoke span to be incorrectly parented. Use HttpContext.Items as an explicit bridge to pass the AspNetCore scope to the Azure Functions middleware. Changes: - Store AspNetCore scope in HttpContext.Items after creation - Add Items property to IFunctionContext duck type interface - Retrieve scope from HttpContext.Items when creating azure_functions.invoke span - Only use HttpContext.Items fallback when tracer.InternalActiveScope is null 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
f0336b8 to
01f415c
Compare
Summary of changes
Fixes incorrect span parenting in isolated Azure Functions when using ASP.NET Core integration. Worker process spans are now correctly parented to the HTTP client span that makes the host→worker call, instead of being incorrectly parented to the root host span.
Reason for change
When using isolated Azure Functions with ASP.NET Core integration and HTTP proxying enabled, spans created in the worker process were being parented to the wrong span, causing disconnected or incorrectly structured traces. This made it difficult to understand the complete request flow and latency attribution.
Current (incorrect) behavior:
Fixed (correct) behavior:
Implementation details
The issue was in
GrpcMessageConversionExtensionsToRpcHttpIntegration.cs. When HTTP proxying is enabled:Fix: When
isHttpProxying && !requiresRouteParameters, skip gRPC context injection entirely and let HTTP client instrumentation handle context propagation naturally.This preserves existing behavior for non-proxying scenarios (timer triggers, non-ASP.NET Core HTTP triggers) while fixing the proxying case.
Test coverage
TODO
Other details
Fixes APMSVLS-58
Documentation:
docs/development/AzureFunctions.mdincluding: