-
Notifications
You must be signed in to change notification settings - Fork 150
Removing V1 tags class from AWS integrations #7746
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 (7746) 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 (7746) - mean (71ms) : 66, 75
master - mean (69ms) : 67, 71
section Bailout
This PR (7746) - mean (76ms) : 74, 78
master - mean (72ms) : 71, 74
section CallTarget+Inlining+NGEN
This PR (7746) - mean (1,083ms) : 988, 1179
master - mean (1,055ms) : 994, 1116
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 (7746) - mean (108ms) : 105, 112
master - mean (107ms) : 104, 110
section Bailout
This PR (7746) - mean (110ms) : 107, 113
master - mean (108ms) : 106, 111
section CallTarget+Inlining+NGEN
This PR (7746) - mean (764ms) : 735, 792
master - mean (756ms) : 731, 782
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7746) - mean (98ms) : 94, 102
master - mean (95ms) : 93, 97
section Bailout
This PR (7746) - mean (100ms) : 95, 105
master - mean (96ms) : 94, 98
section CallTarget+Inlining+NGEN
This PR (7746) - mean (723ms) : 680, 765
master - mean (719ms) : 684, 754
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7746) - mean (98ms) : 93, 103
master - mean (94ms) : 91, 97
section Bailout
This PR (7746) - mean (100ms) : crit, 95, 104
master - mean (94ms) : 93, 96
section CallTarget+Inlining+NGEN
This PR (7746) - mean (687ms) : 671, 703
master - mean (670ms) : 649, 690
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 (7746) - mean (192ms) : 189, 196
master - mean (192ms) : 189, 195
section Bailout
This PR (7746) - mean (196ms) : 193, 198
master - mean (196ms) : 193, 199
section CallTarget+Inlining+NGEN
This PR (7746) - mean (1,167ms) : 1084, 1250
master - mean (1,164ms) : 1102, 1226
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 (7746) - mean (278ms) : 270, 285
master - mean (277ms) : 272, 281
section Bailout
This PR (7746) - mean (280ms) : 272, 288
master - mean (277ms) : 273, 281
section CallTarget+Inlining+NGEN
This PR (7746) - mean (946ms) : 902, 990
master - mean (954ms) : 901, 1008
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7746) - mean (272ms) : 264, 281
master - mean (269ms) : 264, 274
section Bailout
This PR (7746) - mean (272ms) : 268, 275
master - mean (269ms) : 265, 273
section CallTarget+Inlining+NGEN
This PR (7746) - mean (934ms) : 874, 994
master - mean (932ms) : 880, 985
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7746) - mean (274ms) : 263, 285
master - mean (270ms) : 264, 275
section Bailout
This PR (7746) - mean (272ms) : 264, 279
master - mean (269ms) : 266, 272
section CallTarget+Inlining+NGEN
This PR (7746) - mean (862ms) : 835, 889
master - mean (856ms) : 837, 874
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This comment has been minimized.
This comment has been minimized.
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #7746 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.05 KB | 6.1 KB | 51 B | 0.84% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartStopWithChild |
net6.0 | 10.2μs | 12.3ns | 42.5ns | 0 | 0 | 0 | 5.52 KB |
| master | StartStopWithChild |
netcoreapp3.1 | 13.9μs | 67.5ns | 286ns | 0 | 0 | 0 | 5.71 KB |
| master | StartStopWithChild |
net472 | 22.1μs | 121ns | 756ns | 1.07 | 0.321 | 0.107 | 6.05 KB |
| #7746 | StartStopWithChild |
net6.0 | 10.7μs | 60ns | 384ns | 0 | 0 | 0 | 5.52 KB |
| #7746 | StartStopWithChild |
netcoreapp3.1 | 13.7μs | 66.8ns | 284ns | 0 | 0 | 0 | 5.72 KB |
| #7746 | StartStopWithChild |
net472 | 21.9μs | 120ns | 679ns | 0.882 | 0.22 | 0 | 6.1 KB |
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7746
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
3.31 KB
3.35 KB
46 B
1.39%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 3.31 KB | 3.35 KB | 46 B | 1.39% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 930μs | 99.2ns | 384ns | 0 | 0 | 0 | 2.71 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.01ms | 1.09μs | 4.24μs | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 1.21ms | 1.06μs | 4.1μs | 0 | 0 | 0 | 3.31 KB |
| #7746 | WriteAndFlushEnrichedTraces |
net6.0 | 945μs | 117ns | 438ns | 0 | 0 | 0 | 2.71 KB |
| #7746 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.03ms | 814ns | 3.15μs | 0 | 0 | 0 | 2.7 KB |
| #7746 | WriteAndFlushEnrichedTraces |
net472 | 1.2ms | 123ns | 459ns | 0 | 0 | 0 | 3.35 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.05μs | 6.19ns | 61ns | 0 | 0 | 0 | 1.22 KB |
| master | AllCycleSimpleBody |
netcoreapp3.1 | 1.46μs | 6.54ns | 25.3ns | 0 | 0 | 0 | 1.2 KB |
| master | AllCycleSimpleBody |
net472 | 1.02μs | 0.475ns | 1.84ns | 0.194 | 0 | 0 | 1.23 KB |
| master | AllCycleMoreComplexBody |
net6.0 | 7.09μs | 35.1ns | 161ns | 0 | 0 | 0 | 4.72 KB |
| master | AllCycleMoreComplexBody |
netcoreapp3.1 | 9.81μs | 47.2ns | 183ns | 0 | 0 | 0 | 4.62 KB |
| master | AllCycleMoreComplexBody |
net472 | 7.56μs | 8.96ns | 34.7ns | 0.721 | 0 | 0 | 4.74 KB |
| master | ObjectExtractorSimpleBody |
net6.0 | 320ns | 0.194ns | 0.727ns | 0 | 0 | 0 | 280 B |
| master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 401ns | 2.23ns | 13.2ns | 0 | 0 | 0 | 272 B |
| master | ObjectExtractorSimpleBody |
net472 | 300ns | 0.0988ns | 0.383ns | 0.0437 | 0 | 0 | 281 B |
| master | ObjectExtractorMoreComplexBody |
net6.0 | 6.27μs | 28.6ns | 111ns | 0 | 0 | 0 | 3.78 KB |
| master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.81μs | 36.9ns | 148ns | 0 | 0 | 0 | 3.69 KB |
| master | ObjectExtractorMoreComplexBody |
net472 | 6.7μs | 1.88ns | 7.28ns | 0.602 | 0 | 0 | 3.8 KB |
| #7746 | AllCycleSimpleBody |
net6.0 | 1.06μs | 6.19ns | 60.3ns | 0 | 0 | 0 | 1.22 KB |
| #7746 | AllCycleSimpleBody |
netcoreapp3.1 | 1.39μs | 7.46ns | 42.2ns | 0 | 0 | 0 | 1.2 KB |
| #7746 | AllCycleSimpleBody |
net472 | 1.01μs | 0.771ns | 2.99ns | 0.191 | 0 | 0 | 1.23 KB |
| #7746 | AllCycleMoreComplexBody |
net6.0 | 7.28μs | 3.01ns | 11.7ns | 0 | 0 | 0 | 4.72 KB |
| #7746 | AllCycleMoreComplexBody |
netcoreapp3.1 | 9μs | 45.2ns | 197ns | 0 | 0 | 0 | 4.62 KB |
| #7746 | AllCycleMoreComplexBody |
net472 | 7.64μs | 1.94ns | 6.99ns | 0.729 | 0 | 0 | 4.74 KB |
| #7746 | ObjectExtractorSimpleBody |
net6.0 | 322ns | 1.79ns | 10.4ns | 0 | 0 | 0 | 280 B |
| #7746 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 402ns | 2ns | 8.5ns | 0 | 0 | 0 | 272 B |
| #7746 | ObjectExtractorSimpleBody |
net472 | 297ns | 0.0618ns | 0.231ns | 0.0437 | 0 | 0 | 281 B |
| #7746 | ObjectExtractorMoreComplexBody |
net6.0 | 6.34μs | 28.6ns | 111ns | 0 | 0 | 0 | 3.78 KB |
| #7746 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.86μs | 30.4ns | 118ns | 0 | 0 | 0 | 3.69 KB |
| #7746 | ObjectExtractorMoreComplexBody |
net472 | 6.83μs | 6.45ns | 25ns | 0.57 | 0 | 0 | 3.8 KB |
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EncodeArgs |
net6.0 | 78.3μs | 354ns | 1.37μs | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
netcoreapp3.1 | 97.4μs | 164ns | 633ns | 0 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
net472 | 110μs | 55.9ns | 216ns | 4.95 | 0 | 0 | 32.51 KB |
| master | EncodeLegacyArgs |
net6.0 | 144μs | 149ns | 579ns | 0 | 0 | 0 | 2.15 KB |
| master | EncodeLegacyArgs |
netcoreapp3.1 | 200μs | 291ns | 1.05μs | 0 | 0 | 0 | 2.14 KB |
| master | EncodeLegacyArgs |
net472 | 263μs | 18.2ns | 62.9ns | 0 | 0 | 0 | 2.16 KB |
| #7746 | EncodeArgs |
net6.0 | 77μs | 107ns | 416ns | 0 | 0 | 0 | 32.4 KB |
| #7746 | EncodeArgs |
netcoreapp3.1 | 97.9μs | 250ns | 970ns | 0 | 0 | 0 | 32.4 KB |
| #7746 | EncodeArgs |
net472 | 112μs | 10.2ns | 39.4ns | 5.05 | 0 | 0 | 32.51 KB |
| #7746 | EncodeLegacyArgs |
net6.0 | 146μs | 154ns | 595ns | 0 | 0 | 0 | 2.15 KB |
| #7746 | EncodeLegacyArgs |
netcoreapp3.1 | 197μs | 328ns | 1.27μs | 0 | 0 | 0 | 2.14 KB |
| #7746 | EncodeLegacyArgs |
net472 | 262μs | 32ns | 124ns | 0 | 0 | 0 | 2.17 KB |
Benchmarks.Trace.Asm.AppSecWafBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #7746
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1
2.444
295,911.83
723,230.80
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1
2.093
412,424.79
863,258.96
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 | 2.444 | 295,911.83 | 723,230.80 | |
| Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1 | 2.093 | 412,424.79 | 863,258.96 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunWafRealisticBenchmark |
net6.0 | 393μs | 50.8ns | 190ns | 0 | 0 | 0 | 4.55 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 412μs | 87.3ns | 327ns | 0 | 0 | 0 | 4.48 KB |
| master | RunWafRealisticBenchmark |
net472 | 427μs | 52ns | 201ns | 0 | 0 | 0 | 4.66 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 285μs | 21.8ns | 84.5ns | 0 | 0 | 0 | 2.24 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 296μs | 91.6ns | 343ns | 0 | 0 | 0 | 2.22 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 309μs | 24.6ns | 92.2ns | 0 | 0 | 0 | 2.29 KB |
| #7746 | RunWafRealisticBenchmark |
net6.0 | 402μs | 93.8ns | 351ns | 0 | 0 | 0 | 4.55 KB |
| #7746 | RunWafRealisticBenchmark |
netcoreapp3.1 | 784μs | 14.7μs | 147μs | 0 | 0 | 0 | 4.48 KB |
| #7746 | RunWafRealisticBenchmark |
net472 | 428μs | 81.5ns | 316ns | 0 | 0 | 0 | 4.66 KB |
| #7746 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 283μs | 39.7ns | 154ns | 0 | 0 | 0 | 2.24 KB |
| #7746 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 678μs | 13.2μs | 132μs | 0 | 0 | 0 | 2.22 KB |
| #7746 | RunWafRealisticBenchmarkWithAttack |
net472 | 312μs | 37.6ns | 146ns | 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 | 69.8ns | 261ns | 0 | 0 | 0 | 14.52 KB |
| master | SendRequest |
netcoreapp3.1 | 73.1μs | 61.9ns | 240ns | 0 | 0 | 0 | 17.42 KB |
| master | SendRequest |
net472 | 0.0118ns | 0.00183ns | 0.0071ns | 0 | 0 | 0 | 0 b |
| #7746 | SendRequest |
net6.0 | 60.8μs | 48.8ns | 189ns | 0 | 0 | 0 | 14.52 KB |
| #7746 | SendRequest |
netcoreapp3.1 | 71.4μs | 69.9ns | 252ns | 0 | 0 | 0 | 17.42 KB |
| #7746 | SendRequest |
net472 | 0.000114ns | 0.000114ns | 0.000443ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CharSliceBenchmark - Faster 🎉 More allocations ⚠️
Faster 🎉 in #7746
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1
1.127
934,319.14
829,032.44
More allocations ⚠️ in #7746
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0
1 B
3 B
2 B
200.00%
Fewer allocations 🎉 in #7746
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0
7 B
2 B
-5 B
-71.43%
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑netcoreapp3.1 | 1.127 | 934,319.14 | 829,032.44 |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 | 1 B | 3 B | 2 B | 200.00% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 | 7 B | 2 B | -5 B | -71.43% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | OriginalCharSlice |
net6.0 | 1.95ms | 2.84μs | 11μs | 0 | 0 | 0 | 640 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 2.13ms | 9.9μs | 38.3μs | 0 | 0 | 0 | 640 KB |
| master | OriginalCharSlice |
net472 | 2.61ms | 104ns | 391ns | 100 | 0 | 0 | 641.95 KB |
| master | OptimizedCharSlice |
net6.0 | 1.37ms | 140ns | 542ns | 0 | 0 | 0 | 7 B |
| master | OptimizedCharSlice |
netcoreapp3.1 | 1.66ms | 507ns | 1.96μs | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSlice |
net472 | 1.92ms | 2.9μs | 11.2μs | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net6.0 | 811μs | 31.8ns | 123ns | 0 | 0 | 0 | 1 B |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 934μs | 122ns | 471ns | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net472 | 1.16ms | 131ns | 506ns | 0 | 0 | 0 | 0 b |
| #7746 | OriginalCharSlice |
net6.0 | 1.89ms | 231ns | 897ns | 0 | 0 | 0 | 640.01 KB |
| #7746 | OriginalCharSlice |
netcoreapp3.1 | 2.14ms | 6.46μs | 23.3μs | 0 | 0 | 0 | 640 KB |
| #7746 | OriginalCharSlice |
net472 | 2.56ms | 83.6ns | 301ns | 100 | 0 | 0 | 641.95 KB |
| #7746 | OptimizedCharSlice |
net6.0 | 1.47ms | 334ns | 1.3μs | 0 | 0 | 0 | 2 B |
| #7746 | OptimizedCharSlice |
netcoreapp3.1 | 1.67ms | 454ns | 1.76μs | 0 | 0 | 0 | 1 B |
| #7746 | OptimizedCharSlice |
net472 | 2.03ms | 385ns | 1.49μs | 0 | 0 | 0 | 0 b |
| #7746 | OptimizedCharSliceWithPool |
net6.0 | 803μs | 36.5ns | 142ns | 0 | 0 | 0 | 3 B |
| #7746 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 829μs | 40.9ns | 153ns | 0 | 0 | 0 | 0 b |
| #7746 | OptimizedCharSliceWithPool |
net472 | 1.13ms | 82.3ns | 308ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7746
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
55.64 KB
56.25 KB
614 B
1.10%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 55.64 KB | 56.25 KB | 614 B | 1.10% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 669μs | 3.1μs | 11.6μs | 0 | 0 | 0 | 41.65 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 719μs | 3.34μs | 13.8μs | 0 | 0 | 0 | 41.75 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 907μs | 3.6μs | 13.9μs | 8.33 | 0 | 0 | 55.64 KB |
| #7746 | WriteAndFlushEnrichedTraces |
net6.0 | 704μs | 3.41μs | 13.6μs | 0 | 0 | 0 | 41.72 KB |
| #7746 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 669μs | 3.04μs | 11.4μs | 0 | 0 | 0 | 41.93 KB |
| #7746 | WriteAndFlushEnrichedTraces |
net472 | 839μs | 1.61μs | 5.8μs | 8.33 | 0 | 0 | 56.25 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.85μs | 9.06ns | 39.5ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.7μs | 9.32ns | 34.9ns | 0 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.89μs | 2.27ns | 8.79ns | 0.143 | 0.0143 | 0 | 987 B |
| #7746 | ExecuteNonQuery |
net6.0 | 1.86μs | 0.626ns | 2.34ns | 0 | 0 | 0 | 1.02 KB |
| #7746 | ExecuteNonQuery |
netcoreapp3.1 | 2.74μs | 11.7ns | 45.3ns | 0 | 0 | 0 | 1.02 KB |
| #7746 | ExecuteNonQuery |
net472 | 2.93μs | 2.24ns | 8.4ns | 0.144 | 0.0144 | 0 | 987 B |
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | CallElasticsearch |
net6.0 | 1.74μs | 8.34ns | 33.4ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 2.19μs | 3.45ns | 13.4ns | 0 | 0 | 0 | 1.03 KB |
| master | CallElasticsearch |
net472 | 3.62μs | 2.2ns | 8.23ns | 0.163 | 0 | 0 | 1.04 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.83μs | 9.36ns | 37.4ns | 0 | 0 | 0 | 1.01 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.37μs | 9.16ns | 33ns | 0 | 0 | 0 | 1.08 KB |
| master | CallElasticsearchAsync |
net472 | 3.6μs | 4.63ns | 17.9ns | 0.163 | 0 | 0 | 1.1 KB |
| #7746 | CallElasticsearch |
net6.0 | 1.67μs | 8.72ns | 41.8ns | 0 | 0 | 0 | 1.03 KB |
| #7746 | CallElasticsearch |
netcoreapp3.1 | 2.27μs | 9.85ns | 38.1ns | 0 | 0 | 0 | 1.03 KB |
| #7746 | CallElasticsearch |
net472 | 3.48μs | 1.98ns | 7.4ns | 0.157 | 0 | 0 | 1.04 KB |
| #7746 | CallElasticsearchAsync |
net6.0 | 1.89μs | 9.34ns | 40.7ns | 0 | 0 | 0 | 1.01 KB |
| #7746 | CallElasticsearchAsync |
netcoreapp3.1 | 2.38μs | 11.8ns | 48.7ns | 0 | 0 | 0 | 1.08 KB |
| #7746 | CallElasticsearchAsync |
net472 | 3.64μs | 1.83ns | 7.07ns | 0.163 | 0 | 0 | 1.1 KB |
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | ExecuteAsync |
net6.0 | 1.83μs | 5.94ns | 23ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.41μs | 9.84ns | 38.1ns | 0 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 2.53μs | 1.22ns | 4.41ns | 0.14 | 0 | 0 | 915 B |
| #7746 | ExecuteAsync |
net6.0 | 1.79μs | 9.23ns | 44.3ns | 0 | 0 | 0 | 952 B |
| #7746 | ExecuteAsync |
netcoreapp3.1 | 2.54μs | 2.75ns | 10.6ns | 0 | 0 | 0 | 952 B |
| #7746 | ExecuteAsync |
net472 | 2.55μs | 3.09ns | 12ns | 0.14 | 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.05μs | 28ns | 109ns | 0 | 0 | 0 | 2.36 KB |
| master | SendAsync |
netcoreapp3.1 | 9.06μs | 13.2ns | 51ns | 0 | 0 | 0 | 2.9 KB |
| master | SendAsync |
net472 | 12.2μs | 6.67ns | 24.9ns | 0.487 | 0 | 0 | 3.18 KB |
| #7746 | SendAsync |
net6.0 | 6.75μs | 5.94ns | 22.2ns | 0 | 0 | 0 | 2.36 KB |
| #7746 | SendAsync |
netcoreapp3.1 | 8.51μs | 8.87ns | 34.4ns | 0 | 0 | 0 | 2.9 KB |
| #7746 | SendAsync |
net472 | 12μs | 10.5ns | 40.5ns | 0.48 | 0 | 0 | 3.18 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #7746
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
259.11 KB
274.64 KB
15.53 KB
5.99%
Fewer allocations 🎉 in #7746
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1
44.33 KB
44.06 KB
-264 B
-0.60%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
259.74 KB
256.93 KB
-2.82 KB
-1.08%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0
45.72 KB
43.66 KB
-2.06 KB
-4.51%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 259.11 KB | 274.64 KB | 15.53 KB | 5.99% |
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 | 44.33 KB | 44.06 KB | -264 B | -0.60% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 259.74 KB | 256.93 KB | -2.82 KB | -1.08% |
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 | 45.72 KB | 43.66 KB | -2.06 KB | -4.51% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 48.1μs | 603ns | 5.84μs | 0 | 0 | 0 | 45.72 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 50.2μs | 277ns | 2.28μs | 0 | 0 | 0 | 44.33 KB |
| master | StringConcatBenchmark |
net472 | 58.6μs | 226ns | 847ns | 0 | 0 | 0 | 57.34 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 459μs | 2.19μs | 9.56μs | 0 | 0 | 0 | 259.11 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 547μs | 2.47μs | 9.58μs | 0 | 0 | 0 | 259.74 KB |
| master | StringConcatAspectBenchmark |
net472 | 404μs | 1.89μs | 15.3μs | 0 | 0 | 0 | 279.31 KB |
| #7746 | StringConcatBenchmark |
net6.0 | 42.2μs | 212ns | 969ns | 0 | 0 | 0 | 43.66 KB |
| #7746 | StringConcatBenchmark |
netcoreapp3.1 | 48.9μs | 242ns | 1.03μs | 0 | 0 | 0 | 44.06 KB |
| #7746 | StringConcatBenchmark |
net472 | 57.5μs | 155ns | 580ns | 0 | 0 | 0 | 57.34 KB |
| #7746 | StringConcatAspectBenchmark |
net6.0 | 469μs | 1.71μs | 6.16μs | 0 | 0 | 0 | 274.64 KB |
| #7746 | StringConcatAspectBenchmark |
netcoreapp3.1 | 490μs | 2.23μs | 8.36μs | 0 | 0 | 0 | 256.93 KB |
| #7746 | StringConcatAspectBenchmark |
net472 | 415μs | 2.36μs | 17μs | 0 | 0 | 0 | 278.29 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.64μs | 13.1ns | 57.1ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.62μs | 17.5ns | 74.2ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 4.03μs | 8.03ns | 31.1ns | 0.26 | 0 | 0 | 1.64 KB |
| #7746 | EnrichedLog |
net6.0 | 2.61μs | 0.688ns | 2.48ns | 0 | 0 | 0 | 1.7 KB |
| #7746 | EnrichedLog |
netcoreapp3.1 | 3.66μs | 12.9ns | 49.9ns | 0 | 0 | 0 | 1.7 KB |
| #7746 | EnrichedLog |
net472 | 4.02μs | 11.1ns | 43ns | 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 | 77.2ns | 278ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 130μs | 170ns | 636ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 169μs | 306ns | 1.18μs | 0 | 0 | 0 | 4.52 KB |
| #7746 | EnrichedLog |
net6.0 | 123μs | 180ns | 674ns | 0 | 0 | 0 | 4.31 KB |
| #7746 | EnrichedLog |
netcoreapp3.1 | 132μs | 358ns | 1.39μs | 0 | 0 | 0 | 4.31 KB |
| #7746 | EnrichedLog |
net472 | 173μs | 281ns | 1.09μ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 | 5.01μs | 4.55ns | 17ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.77μs | 23ns | 88.9ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.56μs | 6.66ns | 25.8ns | 0.302 | 0 | 0 | 2.08 KB |
| #7746 | EnrichedLog |
net6.0 | 5.19μs | 13.9ns | 53.7ns | 0 | 0 | 0 | 2.26 KB |
| #7746 | EnrichedLog |
netcoreapp3.1 | 6.95μs | 17.4ns | 65ns | 0 | 0 | 0 | 2.26 KB |
| #7746 | EnrichedLog |
net472 | 7.74μs | 13ns | 50.4ns | 0.309 | 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.99μs | 10.3ns | 49.4ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
netcoreapp3.1 | 2.63μs | 8.47ns | 32.8ns | 0 | 0 | 0 | 1.2 KB |
| master | SendReceive |
net472 | 3.15μs | 2.55ns | 9.87ns | 0.189 | 0 | 0 | 1.2 KB |
| #7746 | SendReceive |
net6.0 | 2.04μs | 3.86ns | 14.5ns | 0 | 0 | 0 | 1.2 KB |
| #7746 | SendReceive |
netcoreapp3.1 | 2.65μs | 7.53ns | 29.1ns | 0 | 0 | 0 | 1.2 KB |
| #7746 | SendReceive |
net472 | 3.07μs | 3.7ns | 14.3ns | 0.184 | 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 | 11.8ns | 45.8ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.57μs | 20.5ns | 79.4ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.45μs | 6.8ns | 26.3ns | 0.321 | 0 | 0 | 2.03 KB |
| #7746 | EnrichedLog |
net6.0 | 4.32μs | 6.81ns | 26.4ns | 0 | 0 | 0 | 1.58 KB |
| #7746 | EnrichedLog |
netcoreapp3.1 | 5.46μs | 17.8ns | 68.9ns | 0 | 0 | 0 | 1.63 KB |
| #7746 | EnrichedLog |
net472 | 6.85μs | 15.6ns | 60.3ns | 0.307 | 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.89ns | 17.4ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 973ns | 4.36ns | 16.9ns | 0 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 932ns | 0.531ns | 2.06ns | 0.0888 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 939ns | 4.72ns | 22.1ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.23μs | 5.95ns | 25.2ns | 0 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 1.11μs | 1.12ns | 4.35ns | 0.1 | 0 | 0 | 658 B |
| #7746 | StartFinishSpan |
net6.0 | 779ns | 0.578ns | 2.24ns | 0 | 0 | 0 | 576 B |
| #7746 | StartFinishSpan |
netcoreapp3.1 | 966ns | 4.59ns | 18.9ns | 0 | 0 | 0 | 576 B |
| #7746 | StartFinishSpan |
net472 | 929ns | 0.724ns | 2.8ns | 0.0881 | 0 | 0 | 578 B |
| #7746 | StartFinishScope |
net6.0 | 914ns | 4.91ns | 26.4ns | 0 | 0 | 0 | 696 B |
| #7746 | StartFinishScope |
netcoreapp3.1 | 1.22μs | 6.46ns | 34.2ns | 0 | 0 | 0 | 696 B |
| #7746 | StartFinishScope |
net472 | 1.11μs | 0.943ns | 3.65ns | 0.0993 | 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 | 2.51ns | 9.73ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.43μs | 4.72ns | 18.3ns | 0 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.47μs | 0.466ns | 1.81ns | 0.102 | 0 | 0 | 658 B |
| #7746 | RunOnMethodBegin |
net6.0 | 1.06μs | 0.642ns | 2.23ns | 0 | 0 | 0 | 696 B |
| #7746 | RunOnMethodBegin |
netcoreapp3.1 | 1.45μs | 7.28ns | 34.1ns | 0 | 0 | 0 | 696 B |
| #7746 | RunOnMethodBegin |
net472 | 1.49μs | 1.63ns | 6.32ns | 0.0971 | 0 | 0 | 658 B |
only delete tracer/src/Datadog.Trace/Generated/*/Datadog.Trace.SourceGenerators/TagListGenerator/*V1Tags.g.cs
…dd-trace-dotnet into rithika.narayan/removing-v1-aws
| [Tag(Trace.Tags.PeerService)] | ||
| public string PeerService { get; set; } | ||
|
|
||
| [Tag(Trace.Tags.PeerServiceSource)] | ||
| public string PeerServiceSource { get; set; } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are planning to set them in future PRs, let's wait until that logic is ready before actually adding the tags empty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fwiw, if the tag has no value (null or empty string), we don't serialize it into MessagePack when sending to the agent, so this is pretty harmless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For context, this work was going to be a single PR, but it was growing too big so @rithikanarayan decided to split it into two PRs. She will be setting these tags in the next PR.
| public async Task SubmitsTraces(string packageVersion) | ||
| { | ||
| string metadataSchemaVersion = "v0"; | ||
| SetEnvironmentVariable("DD_TRACE_SPAN_ATTRIBUTE_SCHEMA", metadataSchemaVersion); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's skip setting DD_TRACE_SPAN_ATTRIBUTE_SCHEMA given that it now does nothing for these tests.
| var isExternalSpan = metadataSchemaVersion == "v0"; | ||
| var clientSpanServiceName = isExternalSpan ? $"{EnvironmentHelper.FullSampleName}-aws-dynamodb" : EnvironmentHelper.FullSampleName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can clean these up now
| span => span.Tags.TryGetValue("component", out var component) && component == "aws-sdk"); | ||
|
|
||
| dynamoDbSpans.Should().NotBeEmpty(); | ||
| ValidateIntegrationSpans(dynamoDbSpans, metadataSchemaVersion, expectedServiceName: clientSpanServiceName, isExternalSpan); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just completely get rid of the metadataSchemaVersion variable? Is there a way to ValidateIntegrationSpans that doesn't make us call this "v0"? Don't really like calling the snapshots v0 because this is now a mix between v0 and v1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ValidateIntegationSpans is a shared function between many tests, including those that still have V1 schemas, so for readability and consistency between these tests I think we should keep the metadataSchemaVersion. I have removed its uses where possible (AWS-specific functions).
| [Theory] | ||
| [MemberData(nameof(GetAllConfigs))] | ||
| public void CreateAwsS3TagsReturnsCorrectImplementation(object schemaVersionObject, bool peerServiceTagsEnabled, bool removeClientServiceNamesEnabled) | ||
| { | ||
| var schemaVersion = (SchemaVersion)schemaVersionObject; // Unbox SchemaVersion, which is only defined internally | ||
| var expectedType = schemaVersion switch | ||
| { | ||
| SchemaVersion.V0 when peerServiceTagsEnabled == false => typeof(AwsS3Tags), | ||
| _ => typeof(AwsS3V1Tags), | ||
| }; | ||
| var expectedType = typeof(AwsS3Tags); | ||
|
|
||
| var namingSchema = new NamingSchema(schemaVersion, peerServiceTagsEnabled, removeClientServiceNamesEnabled, DefaultServiceName, _mappings, new Dictionary<string, string>()); | ||
| namingSchema.Messaging.CreateAwsS3Tags("spanKind").Should().BeOfType(expectedType); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we skip these tests altogether now? I don't think they are testing much anymore, maybe you were planning on repurposing them in future PRs?
…ducing use of metadataSchemaVersions
| SetEnvironmentVariable("DD_TRACE_SPAN_ATTRIBUTE_SCHEMA", metadataSchemaVersion); | ||
| var isExternalSpan = metadataSchemaVersion == "v0"; | ||
| var clientSpanServiceName = isExternalSpan ? $"{EnvironmentHelper.FullSampleName}-aws-dynamodb" : EnvironmentHelper.FullSampleName; | ||
| string metadataSchemaVersion = "v0"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small nit-pick, when a local variable never changes, we like to make it a constant. It makes it more obvious to readers, and can avoid bugs where someone changes the value later on (the compiler won't let you if it's const).
| string metadataSchemaVersion = "v0"; | |
| const string metadataSchemaVersion = "v0"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't matter much here since this a test, but I think that following guidelines everywhere is a good practice 😅
|
|
||
| dynamoDbSpans.Should().NotBeEmpty(); | ||
| ValidateIntegrationSpans(dynamoDbSpans, metadataSchemaVersion, expectedServiceName: clientSpanServiceName, isExternalSpan); | ||
| ValidateIntegrationSpans(dynamoDbSpans, metadataSchemaVersion, expectedServiceName: clientSpanServiceName, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In C# you can optionally include the parameter name. It can be used to provide arguments out of order or to skip optional parameters, or, in this case, just to document which value you are passing to make the code more readable. It's especially useful when passing a Boolean ("true what??") 😅
| ValidateIntegrationSpans(dynamoDbSpans, metadataSchemaVersion, expectedServiceName: clientSpanServiceName, true); | |
| ValidateIntegrationSpans(dynamoDbSpans, metadataSchemaVersion, expectedServiceName: clientSpanServiceName, isExternalSpan: true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left small coding-style comments, but feel free to do those in the next PR.
| SchemaVersion.V0 when !_peerServiceTagsEnabled => new AwsS3Tags(), | ||
| _ => new AwsS3V1Tags(spanKind), | ||
| }; | ||
| public AwsS3Tags CreateAwsS3Tags(string spanKind) => new AwsS3Tags(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These types all have constructors that take a spanKind, so we should pass that long.
| public AwsS3Tags CreateAwsS3Tags(string spanKind) => new AwsS3Tags(); | |
| public AwsS3Tags CreateAwsS3Tags(string spanKind) => new AwsS3Tags(spanKind); |
You already did this with AwsKinesisTags and AwsStepFunctionsTags below.
Summary of changes
Reason for change
Cleanup of unused V1 code. Preparation for follow up PR addressing Serverless Service Representation for AWS Managed Services, which requires the V0 schema for these services to have access to the peer service and peer service source tags to hardcode their values in serverless environments.
Implementation details
Test coverage
Other details