Implement Serverless Service Representation (SSR) in AWS Lambda#7850
Implement Serverless Service Representation (SSR) in AWS Lambda#7850rithikanarayan merged 11 commits intomasterfrom
Conversation
|
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (7850) 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 (7850) - mean (77ms) : 71, 83
master - mean (76ms) : 70, 83
section Bailout
This PR (7850) - mean (80ms) : 75, 85
master - mean (82ms) : 74, 89
section CallTarget+Inlining+NGEN
This PR (7850) - mean (1,076ms) : 995, 1157
master - mean (1,079ms) : 1008, 1150
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 (7850) - mean (121ms) : 111, 132
master - mean (120ms) : 112, 129
section Bailout
This PR (7850) - mean (121ms) : 113, 129
master - mean (120ms) : 113, 128
section CallTarget+Inlining+NGEN
This PR (7850) - mean (763ms) : 730, 797
master - mean (774ms) : 735, 814
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7850) - mean (106ms) : 97, 116
master - mean (106ms) : 99, 113
section Bailout
This PR (7850) - mean (107ms) : 99, 115
master - mean (109ms) : 101, 117
section CallTarget+Inlining+NGEN
This PR (7850) - mean (747ms) : 666, 828
master - mean (722ms) : 689, 755
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7850) - mean (122ms) : 89, 155
master - mean (105ms) : 96, 115
section Bailout
This PR (7850) - mean (109ms) : 103, 115
master - mean (106ms) : 98, 114
section CallTarget+Inlining+NGEN
This PR (7850) - mean (697ms) : 655, 738
master - mean (697ms) : 664, 731
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 (7850) - mean (194ms) : 191, 197
master - mean (194ms) : 190, 198
section Bailout
This PR (7850) - mean (197ms) : 194, 200
master - mean (197ms) : 194, 200
section CallTarget+Inlining+NGEN
This PR (7850) - mean (1,120ms) : 1053, 1186
master - mean (1,127ms) : 1053, 1201
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 (7850) - mean (278ms) : 273, 283
master - mean (279ms) : 273, 284
section Bailout
This PR (7850) - mean (279ms) : 275, 283
master - mean (279ms) : 273, 284
section CallTarget+Inlining+NGEN
This PR (7850) - mean (914ms) : 873, 954
master - mean (912ms) : 880, 945
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7850) - mean (273ms) : 264, 281
master - mean (272ms) : 267, 276
section Bailout
This PR (7850) - mean (270ms) : 266, 274
master - mean (272ms) : 268, 276
section CallTarget+Inlining+NGEN
This PR (7850) - mean (883ms) : 844, 922
master - mean (889ms) : 851, 926
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7850) - mean (270ms) : 265, 274
master - mean (272ms) : 265, 278
section Bailout
This PR (7850) - mean (270ms) : 266, 275
master - mean (272ms) : 267, 278
section CallTarget+Inlining+NGEN
This PR (7850) - mean (829ms) : 813, 844
master - mean (829ms) : 807, 852
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #7850 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 ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AspNetCoreBenchmark - Unknown 🤷 More allocations
|
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.AspNetCoreBenchmark.SendRequest‑netcoreapp3.1 | 21.18 KB | 21.34 KB | 152 B | 0.72% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendRequest |
net6.0 | 85.1μs | 341ns | 1.67μs | 0 | 0 | 0 | 18.97 KB |
| master | SendRequest |
netcoreapp3.1 | 96.5μs | 313ns | 1.95μs | 0 | 0 | 0 | 21.18 KB |
| master | SendRequest |
net472 | 0ns | 0ns | 0ns | 0 | 0 | 0 | 0 b |
| #7850 | SendRequest |
net6.0 | 84.4μs | 98.7ns | 369ns | 0 | 0 | 0 | 18.97 KB |
| #7850 | SendRequest |
netcoreapp3.1 | 97.2μs | 356ns | 2.16μs | 0 | 0 | 0 | 21.34 KB |
| #7850 | SendRequest |
net472 | 0ns | 0ns | 0ns | 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.91ms | 1.01μs | 3.64μs | 0 | 0 | 0 | 640 KB |
| master | OriginalCharSlice |
netcoreapp3.1 | 4.06ms | 9.74μs | 36.5μs | 0 | 0 | 0 | 640.05 KB |
| master | OriginalCharSlice |
net472 | 2.56ms | 531ns | 2.06μs | 0 | 0 | 0 | 638.98 KB |
| master | OptimizedCharSlice |
net6.0 | 1.5ms | 987ns | 3.82μs | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSlice |
netcoreapp3.1 | 2.73ms | 911ns | 3.53μs | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSlice |
net472 | 1.97ms | 502ns | 1.95μs | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net6.0 | 1.03ms | 216ns | 780ns | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
netcoreapp3.1 | 1.88ms | 1.45μs | 5.61μs | 0 | 0 | 0 | 0 b |
| master | OptimizedCharSliceWithPool |
net472 | 1.13ms | 373ns | 1.4μs | 0 | 0 | 0 | 0 b |
| #7850 | OriginalCharSlice |
net6.0 | 2.04ms | 1.23μs | 4.42μs | 0 | 0 | 0 | 640 KB |
| #7850 | OriginalCharSlice |
netcoreapp3.1 | 3.94ms | 1.58μs | 6.12μs | 0 | 0 | 0 | 640.05 KB |
| #7850 | OriginalCharSlice |
net472 | 2.62ms | 991ns | 3.84μs | 0 | 0 | 0 | 638.98 KB |
| #7850 | OptimizedCharSlice |
net6.0 | 1.46ms | 1.01μs | 3.9μs | 0 | 0 | 0 | 0 b |
| #7850 | OptimizedCharSlice |
netcoreapp3.1 | 2.74ms | 893ns | 3.22μs | 0 | 0 | 0 | 0 b |
| #7850 | OptimizedCharSlice |
net472 | 1.92ms | 697ns | 2.7μs | 0 | 0 | 0 | 0 b |
| #7850 | OptimizedCharSliceWithPool |
net6.0 | 1.02ms | 470ns | 1.82μs | 0 | 0 | 0 | 0 b |
| #7850 | OptimizedCharSliceWithPool |
netcoreapp3.1 | 1.89ms | 1.46μs | 5.45μs | 0 | 0 | 0 | 0 b |
| #7850 | OptimizedCharSliceWithPool |
net472 | 1.16ms | 520ns | 2.01μs | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #7850
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0
42.13 KB
41.66 KB
-476 B
-1.13%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 42.13 KB | 41.66 KB | -476 B | -1.13% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 749μs | 2.98μs | 11.2μs | 0 | 0 | 0 | 42.13 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 764μs | 2.46μs | 9.22μs | 0 | 0 | 0 | 41.85 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 902μs | 2.22μs | 8.3μs | 8.33 | 4.17 | 0 | 56.05 KB |
| #7850 | WriteAndFlushEnrichedTraces |
net6.0 | 680μs | 1.13μs | 4.39μs | 0 | 0 | 0 | 41.66 KB |
| #7850 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 762μs | 3.25μs | 12.6μs | 0 | 0 | 0 | 42.04 KB |
| #7850 | WriteAndFlushEnrichedTraces |
net472 | 967μs | 4.3μs | 16.7μs | 4.81 | 0 | 0 | 55.78 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.92μs | 7.22ns | 27ns | 0 | 0 | 0 | 968 B |
| master | ExecuteNonQuery |
netcoreapp3.1 | 2.48μs | 4.73ns | 17.7ns | 0 | 0 | 0 | 960 B |
| master | ExecuteNonQuery |
net472 | 2.75μs | 4.1ns | 15.9ns | 0.137 | 0 | 0 | 931 B |
| #7850 | ExecuteNonQuery |
net6.0 | 1.97μs | 4.06ns | 15.7ns | 0 | 0 | 0 | 968 B |
| #7850 | ExecuteNonQuery |
netcoreapp3.1 | 2.58μs | 6.29ns | 24.3ns | 0 | 0 | 0 | 960 B |
| #7850 | ExecuteNonQuery |
net472 | 2.78μs | 1.31ns | 4.9ns | 0.139 | 0 | 0 | 931 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.62μs | 7.88ns | 35.2ns | 0 | 0 | 0 | 952 B |
| master | CallElasticsearch |
netcoreapp3.1 | 2.42μs | 5.64ns | 21.1ns | 0 | 0 | 0 | 968 B |
| master | CallElasticsearch |
net472 | 3.29μs | 3.98ns | 15.4ns | 0.147 | 0 | 0 | 955 B |
| master | CallElasticsearchAsync |
net6.0 | 1.78μs | 8.08ns | 32.3ns | 0 | 0 | 0 | 928 B |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 2.43μs | 1.55ns | 5.79ns | 0 | 0 | 0 | 1.02 KB |
| master | CallElasticsearchAsync |
net472 | 3.52μs | 2.8ns | 10.5ns | 0.158 | 0 | 0 | 1.01 KB |
| #7850 | CallElasticsearch |
net6.0 | 1.75μs | 7.36ns | 28.5ns | 0 | 0 | 0 | 952 B |
| #7850 | CallElasticsearch |
netcoreapp3.1 | 2.24μs | 6.91ns | 26.8ns | 0 | 0 | 0 | 968 B |
| #7850 | CallElasticsearch |
net472 | 3.26μs | 5.21ns | 20.2ns | 0.146 | 0 | 0 | 955 B |
| #7850 | CallElasticsearchAsync |
net6.0 | 1.71μs | 6.65ns | 24.9ns | 0 | 0 | 0 | 928 B |
| #7850 | CallElasticsearchAsync |
netcoreapp3.1 | 2.44μs | 12.7ns | 60.8ns | 0 | 0 | 0 | 1.02 KB |
| #7850 | CallElasticsearchAsync |
net472 | 3.43μs | 3.95ns | 15.3ns | 0.155 | 0 | 0 | 1.01 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.81μs | 7.33ns | 25.4ns | 0 | 0 | 0 | 896 B |
| master | ExecuteAsync |
netcoreapp3.1 | 2.46μs | 7.27ns | 28.2ns | 0 | 0 | 0 | 896 B |
| master | ExecuteAsync |
net472 | 2.58μs | 2.92ns | 11.3ns | 0.13 | 0 | 0 | 859 B |
| #7850 | ExecuteAsync |
net6.0 | 1.87μs | 5.61ns | 21.7ns | 0 | 0 | 0 | 896 B |
| #7850 | ExecuteAsync |
netcoreapp3.1 | 2.32μs | 8.97ns | 34.7ns | 0 | 0 | 0 | 896 B |
| #7850 | ExecuteAsync |
net472 | 2.57μs | 4.67ns | 18.1ns | 0.128 | 0 | 0 | 859 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.89μs | 13.9ns | 51.9ns | 0 | 0 | 0 | 2.29 KB |
| master | SendAsync |
netcoreapp3.1 | 8.5μs | 31.8ns | 123ns | 0 | 0 | 0 | 2.83 KB |
| master | SendAsync |
net472 | 12.2μs | 5.47ns | 21.2ns | 0.485 | 0 | 0 | 3.08 KB |
| #7850 | SendAsync |
net6.0 | 7μs | 11.9ns | 46ns | 0 | 0 | 0 | 2.29 KB |
| #7850 | SendAsync |
netcoreapp3.1 | 8.2μs | 27.6ns | 107ns | 0 | 0 | 0 | 2.83 KB |
| #7850 | SendAsync |
net472 | 12μs | 6.76ns | 26.2ns | 0.481 | 0 | 0 | 3.08 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #7850
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
271.17 KB
259.09 KB
-12.08 KB
-4.45%
| Benchmark | Base Allocated | Diff Allocated | Change | Change % |
|---|---|---|---|---|
| Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 271.17 KB | 259.09 KB | -12.08 KB | -4.45% |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 46.1μs | 270ns | 2.29μs | 0 | 0 | 0 | 42.51 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 48.9μs | 257ns | 1.64μs | 0 | 0 | 0 | 42.54 KB |
| master | StringConcatBenchmark |
net472 | 56.8μs | 208ns | 720ns | 0 | 0 | 0 | 49.15 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 451μs | 967ns | 5.12μs | 0 | 0 | 0 | 271.17 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 480μs | 6.03μs | 59.7μs | 0 | 0 | 0 | 276.35 KB |
| master | StringConcatAspectBenchmark |
net472 | 403μs | 1.94μs | 7.99μs | 0 | 0 | 0 | 270.34 KB |
| #7850 | StringConcatBenchmark |
net6.0 | 46.7μs | 250ns | 1.27μs | 0 | 0 | 0 | 42.51 KB |
| #7850 | StringConcatBenchmark |
netcoreapp3.1 | 50.5μs | 261ns | 1.31μs | 0 | 0 | 0 | 42.54 KB |
| #7850 | StringConcatBenchmark |
net472 | 57.3μs | 133ns | 479ns | 0 | 0 | 0 | 49.15 KB |
| #7850 | StringConcatAspectBenchmark |
net6.0 | 466μs | 2.37μs | 10.8μs | 0 | 0 | 0 | 259.09 KB |
| #7850 | StringConcatAspectBenchmark |
netcoreapp3.1 | 532μs | 828ns | 4.38μs | 0 | 0 | 0 | 275.82 KB |
| #7850 | StringConcatAspectBenchmark |
net472 | 405μs | 2.18μs | 11.9μs | 0 | 0 | 0 | 270.34 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.75μs | 0.827ns | 3.2ns | 0 | 0 | 0 | 1.69 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.57μs | 12.9ns | 50.1ns | 0 | 0 | 0 | 1.7 KB |
| master | EnrichedLog |
net472 | 3.83μs | 7.28ns | 28.2ns | 0.247 | 0 | 0 | 1.6 KB |
| #7850 | EnrichedLog |
net6.0 | 2.73μs | 9.84ns | 38.1ns | 0 | 0 | 0 | 1.69 KB |
| #7850 | EnrichedLog |
netcoreapp3.1 | 3.49μs | 17.6ns | 78.5ns | 0 | 0 | 0 | 1.7 KB |
| #7850 | EnrichedLog |
net472 | 3.8μs | 4.92ns | 19.1ns | 0.245 | 0 | 0 | 1.6 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 | 60.9ns | 220ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
netcoreapp3.1 | 129μs | 97.5ns | 378ns | 0 | 0 | 0 | 4.31 KB |
| master | EnrichedLog |
net472 | 166μs | 31.2ns | 117ns | 0 | 0 | 0 | 4.51 KB |
| #7850 | EnrichedLog |
net6.0 | 123μs | 99.2ns | 371ns | 0 | 0 | 0 | 4.31 KB |
| #7850 | EnrichedLog |
netcoreapp3.1 | 128μs | 153ns | 574ns | 0 | 0 | 0 | 4.31 KB |
| #7850 | EnrichedLog |
net472 | 167μs | 94.1ns | 364ns | 0 | 0 | 0 | 4.51 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.98μs | 22.2ns | 86ns | 0 | 0 | 0 | 2.24 KB |
| master | EnrichedLog |
netcoreapp3.1 | 6.86μs | 30.8ns | 119ns | 0 | 0 | 0 | 2.26 KB |
| master | EnrichedLog |
net472 | 7.69μs | 8.09ns | 31.3ns | 0.306 | 0 | 0 | 2.05 KB |
| #7850 | EnrichedLog |
net6.0 | 5.25μs | 15.9ns | 61.5ns | 0 | 0 | 0 | 2.24 KB |
| #7850 | EnrichedLog |
netcoreapp3.1 | 6.88μs | 23.9ns | 89.3ns | 0 | 0 | 0 | 2.26 KB |
| #7850 | EnrichedLog |
net472 | 7.72μs | 8.81ns | 34.1ns | 0.308 | 0 | 0 | 2.05 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.88μs | 4.24ns | 16.4ns | 0 | 0 | 0 | 1.12 KB |
| master | SendReceive |
netcoreapp3.1 | 2.47μs | 11.9ns | 50.4ns | 0 | 0 | 0 | 1.14 KB |
| master | SendReceive |
net472 | 2.95μs | 2.86ns | 11.1ns | 0.176 | 0 | 0 | 1.12 KB |
| #7850 | SendReceive |
net6.0 | 2μs | 1.51ns | 5.85ns | 0 | 0 | 0 | 1.12 KB |
| #7850 | SendReceive |
netcoreapp3.1 | 2.57μs | 10.5ns | 40.8ns | 0 | 0 | 0 | 1.14 KB |
| #7850 | SendReceive |
net472 | 2.86μs | 2.54ns | 9.84ns | 0.172 | 0 | 0 | 1.12 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.47μs | 3.43ns | 12.8ns | 0 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 5.8μs | 19.6ns | 76.1ns | 0 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 6.51μs | 7.19ns | 27.8ns | 0.292 | 0 | 0 | 2.03 KB |
| #7850 | EnrichedLog |
net6.0 | 4.45μs | 4.66ns | 18.1ns | 0 | 0 | 0 | 1.58 KB |
| #7850 | EnrichedLog |
netcoreapp3.1 | 5.8μs | 16.8ns | 65.1ns | 0 | 0 | 0 | 1.63 KB |
| #7850 | EnrichedLog |
net472 | 6.54μs | 5.37ns | 20.8ns | 0.293 | 0 | 0 | 2.03 KB |
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartFinishSpan |
net6.0 | 758ns | 4.1ns | 22.4ns | 0 | 0 | 0 | 520 B |
| master | StartFinishSpan |
netcoreapp3.1 | 949ns | 4.93ns | 24.2ns | 0 | 0 | 0 | 520 B |
| master | StartFinishSpan |
net472 | 890ns | 0.545ns | 2.11ns | 0.0801 | 0 | 0 | 522 B |
| master | StartFinishScope |
net6.0 | 896ns | 4.16ns | 16.7ns | 0 | 0 | 0 | 640 B |
| master | StartFinishScope |
netcoreapp3.1 | 1.15μs | 5.09ns | 19.7ns | 0 | 0 | 0 | 640 B |
| master | StartFinishScope |
net472 | 1.07μs | 0.569ns | 2.05ns | 0.0927 | 0 | 0 | 602 B |
| master | StartFinishTwoScopes |
net6.0 | 1.8μs | 9.03ns | 36.1ns | 0 | 0 | 0 | 1.19 KB |
| master | StartFinishTwoScopes |
netcoreapp3.1 | 2.23μs | 9.86ns | 38.2ns | 0 | 0 | 0 | 1.19 KB |
| master | StartFinishTwoScopes |
net472 | 2.14μs | 2.16ns | 8.35ns | 0.171 | 0 | 0 | 1.08 KB |
| #7850 | StartFinishSpan |
net6.0 | 791ns | 2.02ns | 7.81ns | 0 | 0 | 0 | 520 B |
| #7850 | StartFinishSpan |
netcoreapp3.1 | 951ns | 4.52ns | 19.2ns | 0 | 0 | 0 | 520 B |
| #7850 | StartFinishSpan |
net472 | 889ns | 0.0557ns | 0.208ns | 0.0802 | 0 | 0 | 522 B |
| #7850 | StartFinishScope |
net6.0 | 969ns | 1.8ns | 6.96ns | 0 | 0 | 0 | 640 B |
| #7850 | StartFinishScope |
netcoreapp3.1 | 1.15μs | 5.92ns | 28.4ns | 0 | 0 | 0 | 640 B |
| #7850 | StartFinishScope |
net472 | 1.08μs | 0.305ns | 1.14ns | 0.0916 | 0 | 0 | 602 B |
| #7850 | StartFinishTwoScopes |
net6.0 | 1.79μs | 9.85ns | 57.4ns | 0 | 0 | 0 | 1.19 KB |
| #7850 | StartFinishTwoScopes |
netcoreapp3.1 | 2.2μs | 10.4ns | 42.9ns | 0 | 0 | 0 | 1.19 KB |
| #7850 | StartFinishTwoScopes |
net472 | 2.14μs | 0.524ns | 2.03ns | 0.16 | 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.06μs | 5.45ns | 21.1ns | 0 | 0 | 0 | 640 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 1.38μs | 4.57ns | 17.7ns | 0 | 0 | 0 | 640 B |
| master | RunOnMethodBegin |
net472 | 1.43μs | 0.475ns | 1.71ns | 0.093 | 0 | 0 | 602 B |
| #7850 | RunOnMethodBegin |
net6.0 | 1.06μs | 0.749ns | 2.9ns | 0 | 0 | 0 | 640 B |
| #7850 | RunOnMethodBegin |
netcoreapp3.1 | 1.39μs | 6.83ns | 29.8ns | 0 | 0 | 0 | 640 B |
| #7850 | RunOnMethodBegin |
net472 | 1.45μs | 2.42ns | 9.39ns | 0.0953 | 0 | 0 | 602 B |
Snapshots difference summaryThe following differences have been observed in committed snapshots. It is meant to help the reviewer. 7 occurrences of : + peer.service: MyTableName,
[...]
+ _dd.peer.service.source: tablename
1 occurrences of : + peer.service: MyEventBus,
[...]
+ _dd.peer.service.source: rulename
2 occurrences of : + peer.service: MyStreamName,
[...]
+ _dd.peer.service.source: streamname
14 occurrences of : + peer.service: my-bucket,
[...]
+ _dd.peer.service.source: bucketname
1 occurrences of : + _dd.peer.service.source: bucketname
4 occurrences of : + peer.service: MyTopic,
[...]
+ _dd.peer.service.source: topicname
16 occurrences of : + peer.service: MyAsyncSQSQueue,
[...]
+ _dd.peer.service.source: queuename
16 occurrences of : + peer.service: MyAsyncSQSQueue2,
[...]
+ _dd.peer.service.source: queuename
2 occurrences of : + peer.service: StepFunction,
[...]
+ _dd.peer.service.source: statemachinename
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
tracer/test/Datadog.Trace.Tests/Util/PeerServiceHelpersTests.cs
Outdated
Show resolved
Hide resolved
lucaspimentel
left a comment
There was a problem hiding this comment.
Thanks. Just two non-blocking comments.
Summary of changes
Fixes the Serverless Service Representation (SSR) for Dotnet.
In serverless environments, sets peer.service tag for outbound AWS managed service spans to {service type}.{region}.amazonaws.com:
SQS: sqs.us-east-1.amazonaws.com
SNS: sns.us-east-1.amazonaws.com
Kinesis: kinesis.us-east-1.amazonaws.com
Eventbridge: events.us-east-1.amazonaws.com
s3: bucket-name.s3.us-east-1.amazonaws.com
Dynamodb: dynamodb.us-east-1.amazonaws.com
Sets peer.service.source to peer.service for these serverless cases.
In non-serverless cases we assign the peer.service tag to the values of the following tags:
SQS: AwsSqsTags.QueueName
SNS: AwsSnsTags.TopicName
Kinesis: AwsKinesisTags.StreamName
Eventbridge: AwsEventBridgeTags.RuleName
S3: AwsS3Tags.BucketName
Dynamodb: AwsDynamoDbTags.TableName
StepFunctions: AwsStepFunctionsTags.StateMachineName
Sets peer.service source to the respective tag itself. (Ex. for an SQS queue with the name "MyQueue", peer.service = "MyQueue" and peer.service.source = "queuename").
Adds DerivePeerService function in Util/PeerServiceHelpers to do the above assignments.
Reason for change
Before SSR implementation:

After SSR implementation:

Implementation details
See summary of changes.
Test coverage
Covered by AWS integration tests in non-serverless case. Added unit tests for the DerivePeerService function in the PeerServiceHelpersTests.cs file. Manually tested in serverless case as follows due to challenges in assigning the region tag in an integration test. Tested functionality in AWS Lambda by using custom dd-trace-dotnet layer with arn:
arn:aws:lambda:us-east-1:425362996713:layer:ssr-dotnet-rithika:15on a sample app that had an API Gateway trigger a producer lambda, which sent data through Kinesis, SQS, SNS, and EventBridge to consumer lambdas, which wrote to S3 and DynamoDB. Visually inspected the service map (see images in Reason for change section) to check for correct labelling of the inferred spans for these services. Also checked tags in the trace overview to confirm the correct values of the peer.service and peer.service.source tags.Other details