[ASM] Add http header X-Amzn-Trace-Id
Summary of changes
Collect header X-Amzn-Trace-Id to http.request.headers.x-amzn-trace-id so that XRAY traces (with the trace id from AWS) and our traces reporting http.request.headers.x-amzn-trace-id might be connected by the backend, and any upstream service using XRAY might be identified and connected by APM Flows
RFC: https://docs.google.com/document/d/14bzuMNfoeQfR8Fd8qyDUcIacb9AtDW_-X2ao9tvCa1A/edit#heading=h.328fsgyqewsj
Other headers might eventually be collected to the same destination http.request_id like cloudflare..
Reason for change
Implementation details
Test coverage
Adapt existing tests. See also system test: https://github.com/DataDog/system-tests/pull/2041#pullrequestreview-1879844041
Other details
Datadog Report
Branch report: anna/asm-add-amzn-header
Commit report: e0c0e0b
Test service: dd-trace-dotnet
:x: 1 Failed (0 Known Flaky), 310981 Passed, 1584 Skipped, 41m 11.42s Wall Time
:x: Failed Tests (1)
EncodeLegacyArgs-Benchmarks.Trace.Asm.AppSecEncoderBenchmark- Details
Execution-Time Benchmarks Report :stopwatch:
Execution-time results for samples comparing the following branches/commits:
Execution-time benchmarks measure the whole time it takes to execute a program. And are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are shown in red. The following thresholds were used for comparing the execution times:
- Welch test with statistical test for significance of 5%
- Only results indicating a difference greater than 5% and 5 ms are considered.
Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard.
Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph).
gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5178) - mean (73ms) : 66, 80
. : milestone, 73,
master - mean (71ms) : 64, 79
. : milestone, 71,
section CallTarget+Inlining+NGEN
This PR (5178) - mean (1,017ms) : 996, 1039
. : milestone, 1017,
master - mean (1,020ms) : 999, 1041
. : milestone, 1020,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5178) - mean (110ms) : 106, 113
. : milestone, 110,
master - mean (110ms) : 106, 114
. : milestone, 110,
section CallTarget+Inlining+NGEN
This PR (5178) - mean (743ms) : 720, 765
. : milestone, 743,
master - mean (739ms) : 720, 758
. : milestone, 739,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5178) - mean (93ms) : 89, 96
. : milestone, 93,
master - mean (92ms) : 90, 95
. : milestone, 92,
section CallTarget+Inlining+NGEN
This PR (5178) - mean (689ms) : 667, 711
. : milestone, 689,
master - mean (691ms) : 669, 713
. : milestone, 691,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5178) - mean (188ms) : 185, 191
. : milestone, 188,
master - mean (187ms) : 184, 191
. : milestone, 187,
section CallTarget+Inlining+NGEN
This PR (5178) - mean (1,085ms) : 1062, 1107
. : milestone, 1085,
master - mean (1,081ms) : 1061, 1101
. : milestone, 1081,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5178) - mean (273ms) : 268, 277
. : milestone, 273,
master - mean (270ms) : 264, 276
. : milestone, 270,
section CallTarget+Inlining+NGEN
This PR (5178) - mean (888ms) : 866, 911
. : milestone, 888,
master - mean (884ms) : 863, 905
. : milestone, 884,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5178) - mean (261ms) : 257, 265
. : milestone, 261,
master - mean (259ms) : 255, 264
. : milestone, 259,
section CallTarget+Inlining+NGEN
This PR (5178) - mean (865ms) : 839, 891
. : milestone, 865,
master - mean (862ms) : 840, 885
. : milestone, 862,
Throughput/Crank Report:zap:
Throughput results for AspNetCoreSimpleController comparing the following branches/commits:
Cases where throughput results for the PR are worse than latest master (5% drop or greater), results are shown in red.
Note that these results are based on a single point-in-time result for each branch. For full results, see one of the many, many dashboards!
gantt
title Throughput Linux x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (5178) (11.116M) : 0, 11115722
master (11.027M) : 0, 11026822
benchmarks/2.9.0 (11.441M) : 0, 11440819
section Automatic
This PR (5178) (7.826M) : 0, 7825768
master (7.668M) : 0, 7667630
benchmarks/2.9.0 (8.279M) : 0, 8278641
section Trace stats
This PR (5178) (8.124M) : 0, 8124370
master (7.941M) : 0, 7940559
section Manual
This PR (5178) (9.638M) : 0, 9638480
master (9.543M) : 0, 9542981
section Manual + Automatic
This PR (5178) (7.313M) : 0, 7312580
master (7.329M) : 0, 7329210
section Version Conflict
This PR (5178) (6.601M) : 0, 6600641
master (6.506M) : 0, 6505794
gantt
title Throughput Linux arm64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (5178) (9.453M) : 0, 9452821
master (9.868M) : 0, 9868320
benchmarks/2.9.0 (9.449M) : 0, 9448631
section Automatic
This PR (5178) (6.375M) : 0, 6375489
master (6.641M) : 0, 6641481
section Trace stats
This PR (5178) (6.920M) : 0, 6919557
master (6.996M) : 0, 6996397
section Manual
This PR (5178) (8.156M) : 0, 8155578
master (8.395M) : 0, 8395069
section Manual + Automatic
This PR (5178) (6.236M) : 0, 6236190
master (6.209M) : 0, 6209484
section Version Conflict
This PR (5178) (5.543M) : 0, 5542803
master (5.724M) : 0, 5723880
gantt
title Throughput Windows x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (5178) (10.047M) : 0, 10046590
master (9.937M) : 0, 9937171
benchmarks/2.9.0 (9.815M) : 0, 9814765
section Automatic
This PR (5178) (7.232M) : 0, 7232276
master (7.202M) : 0, 7202285
benchmarks/2.9.0 (7.255M) : 0, 7254797
section Trace stats
This PR (5178) (7.447M) : 0, 7446907
master (7.422M) : 0, 7422329
section Manual
This PR (5178) (8.847M) : 0, 8847176
master (8.985M) : 0, 8984711
section Manual + Automatic
This PR (5178) (6.960M) : 0, 6960459
master (6.966M) : 0, 6966271
section Version Conflict
This PR (5178) (6.274M) : 0, 6274253
master (6.248M) : 0, 6248072
Datadog Report
Branch report: anna/asm-add-amzn-header
Commit report: 0bacaca
Test service: dd-trace-dotnet
:white_check_mark: 0 Failed, 334061 Passed, 1571 Skipped, 37m 56.28s Wall Time :snowflake: 1 New Flaky
New Flaky Tests (1)
-
ObfuscateWithDefaultPattern-Datadog.Trace.Tests.Util.Http.EvidenceRedactorTests- Last FailureExpand for error
xpected string to be "key1=val1&<redacted>&key2=val2" with a length of 30, but "" has a length of 0, differs near "" (index 0).
Benchmarks Report for tracer :snail:
Benchmarks for #5178 compared to master:
- 1 benchmarks are faster, with geometric mean 1.163
- 3 benchmarks are slower, with geometric mean 1.176
- All benchmarks have the same allocations
The following thresholds were used for comparing the benchmark speeds:
- Mann–Whitney U test with statistical test for significance of 5%
- Only results indicating a difference greater than 10% and 0.3 ns are considered.
Allocation changes below 0.5% are ignored.
Benchmark details
Benchmarks.Trace.ActivityBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartStopWithChild |
net6.0 | 8.72μs | 45.8ns | 229ns | 0.0213 | 0.00853 | 0 | 7.54 KB |
| master | StartStopWithChild |
netcoreapp3.1 | 10.5μs | 53.4ns | 244ns | 0.0265 | 0.0106 | 0 | 7.64 KB |
| master | StartStopWithChild |
net472 | 16.9μs | 54.1ns | 210ns | 1.36 | 0.381 | 0.116 | 8.08 KB |
| #5178 | StartStopWithChild |
net6.0 | 8.88μs | 49.2ns | 295ns | 0.0251 | 0.0125 | 0 | 7.53 KB |
| #5178 | StartStopWithChild |
netcoreapp3.1 | 10.5μs | 57.3ns | 348ns | 0.0247 | 0.00988 | 0 | 7.64 KB |
| #5178 | StartStopWithChild |
net472 | 17μs | 60ns | 232ns | 1.37 | 0.375 | 0.0979 | 8.08 KB |
Benchmarks.Trace.AgentWriterBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 477μs | 368ns | 1.43μs | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 632μs | 210ns | 758ns | 0 | 0 | 0 | 2.7 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 824μs | 332ns | 1.29μs | 0.408 | 0 | 0 | 3.3 KB |
| #5178 | WriteAndFlushEnrichedTraces |
net6.0 | 458μs | 173ns | 671ns | 0 | 0 | 0 | 2.7 KB |
| #5178 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 614μs | 226ns | 846ns | 0 | 0 | 0 | 2.7 KB |
| #5178 | WriteAndFlushEnrichedTraces |
net472 | 821μs | 698ns | 2.7μs | 0.408 | 0 | 0 | 3.3 KB |
Benchmarks.Trace.AspNetCoreBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendRequest |
net6.0 | 169μs | 167ns | 646ns | 0.167 | 0 | 0 | 18.38 KB |
| master | SendRequest |
netcoreapp3.1 | 189μs | 234ns | 908ns | 0.19 | 0 | 0 | 20.54 KB |
| master | SendRequest |
net472 | 0.00121ns | 0.000317ns | 0.00119ns | 0 | 0 | 0 | 0 b |
| #5178 | SendRequest |
net6.0 | 169μs | 196ns | 759ns | 0.253 | 0 | 0 | 18.38 KB |
| #5178 | SendRequest |
netcoreapp3.1 | 190μs | 363ns | 1.41μs | 0.19 | 0 | 0 | 20.54 KB |
| #5178 | SendRequest |
net472 | 0.000914ns | 0.000423ns | 0.00158ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | WriteAndFlushEnrichedTraces |
net6.0 | 541μs | 291ns | 1.05μs | 0.551 | 0 | 0 | 41.52 KB |
| master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 649μs | 485ns | 1.68μs | 0.324 | 0 | 0 | 41.81 KB |
| master | WriteAndFlushEnrichedTraces |
net472 | 841μs | 4.07μs | 17.3μs | 8.3 | 2.62 | 0.437 | 53.25 KB |
| #5178 | WriteAndFlushEnrichedTraces |
net6.0 | 544μs | 307ns | 1.11μs | 0.546 | 0 | 0 | 41.53 KB |
| #5178 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 656μs | 334ns | 1.3μs | 0.327 | 0 | 0 | 41.87 KB |
| #5178 | WriteAndFlushEnrichedTraces |
net472 | 848μs | 4.53μs | 24.4μs | 8.08 | 2.55 | 0.425 | 53.24 KB |
Benchmarks.Trace.DbCommandBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | ExecuteNonQuery |
net6.0 | 1.27μs | 0.545ns | 2.11ns | 0.0108 | 0 | 0 | 800 B |
| master | ExecuteNonQuery |
netcoreapp3.1 | 1.49μs | 0.906ns | 3.39ns | 0.0106 | 0 | 0 | 800 B |
| master | ExecuteNonQuery |
net472 | 1.9μs | 0.533ns | 2.07ns | 0.12 | 0 | 0 | 762 B |
| #5178 | ExecuteNonQuery |
net6.0 | 1.21μs | 1.15ns | 4.46ns | 0.0109 | 0 | 0 | 800 B |
| #5178 | ExecuteNonQuery |
netcoreapp3.1 | 1.52μs | 0.503ns | 1.95ns | 0.0107 | 0 | 0 | 800 B |
| #5178 | ExecuteNonQuery |
net472 | 1.79μs | 1.2ns | 4.48ns | 0.121 | 0 | 0 | 762 B |
Benchmarks.Trace.ElasticsearchBenchmark - Slower :warning: Same allocations :heavy_check_mark:
Slower :warning: in #5178
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0
1.115
1,251.71
1,395.93
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | CallElasticsearch |
net6.0 | 1.25μs | 0.872ns | 3.38ns | 0.0143 | 0 | 0 | 1.02 KB |
| master | CallElasticsearch |
netcoreapp3.1 | 1.6μs | 0.772ns | 2.99ns | 0.0135 | 0 | 0 | 1.02 KB |
| master | CallElasticsearch |
net472 | 2.6μs | 0.574ns | 2.22ns | 0.164 | 0 | 0 | 1.04 KB |
| master | CallElasticsearchAsync |
net6.0 | 1.38μs | 0.914ns | 3.54ns | 0.0138 | 0 | 0 | 1 KB |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 1.73μs | 0.973ns | 3.77ns | 0.0146 | 0 | 0 | 1.07 KB |
| master | CallElasticsearchAsync |
net472 | 2.69μs | 1.57ns | 6.07ns | 0.173 | 0 | 0 | 1.09 KB |
| #5178 | CallElasticsearch |
net6.0 | 1.4μs | 0.454ns | 1.7ns | 0.014 | 0 | 0 | 1.02 KB |
| #5178 | CallElasticsearch |
netcoreapp3.1 | 1.64μs | 0.765ns | 2.86ns | 0.0138 | 0 | 0 | 1.02 KB |
| #5178 | CallElasticsearch |
net472 | 2.69μs | 1.59ns | 5.96ns | 0.163 | 0 | 0 | 1.04 KB |
| #5178 | CallElasticsearchAsync |
net6.0 | 1.36μs | 0.703ns | 2.72ns | 0.0144 | 0 | 0 | 1 KB |
| #5178 | CallElasticsearchAsync |
netcoreapp3.1 | 1.7μs | 0.856ns | 3.32ns | 0.0144 | 0 | 0 | 1.07 KB |
| #5178 | CallElasticsearchAsync |
net472 | 2.69μs | 1.89ns | 7.09ns | 0.173 | 0 | 0 | 1.09 KB |
Benchmarks.Trace.GraphQLBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | ExecuteAsync |
net6.0 | 1.29μs | 0.531ns | 1.99ns | 0.0128 | 0 | 0 | 944 B |
| master | ExecuteAsync |
netcoreapp3.1 | 1.7μs | 2.2ns | 8.24ns | 0.0127 | 0 | 0 | 944 B |
| master | ExecuteAsync |
net472 | 1.89μs | 3.1ns | 12ns | 0.144 | 0 | 0 | 907 B |
| #5178 | ExecuteAsync |
net6.0 | 1.38μs | 0.955ns | 3.44ns | 0.0129 | 0 | 0 | 944 B |
| #5178 | ExecuteAsync |
netcoreapp3.1 | 1.71μs | 1.04ns | 3.9ns | 0.0129 | 0 | 0 | 944 B |
| #5178 | ExecuteAsync |
net472 | 1.83μs | 0.614ns | 2.3ns | 0.143 | 0 | 0 | 907 B |
Benchmarks.Trace.HttpClientBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendAsync |
net6.0 | 4.16μs | 1.07ns | 4ns | 0.0311 | 0 | 0 | 2.18 KB |
| master | SendAsync |
netcoreapp3.1 | 5.11μs | 3.54ns | 13.7ns | 0.0359 | 0 | 0 | 2.71 KB |
| master | SendAsync |
net472 | 7.65μs | 2.38ns | 9.22ns | 0.486 | 0 | 0 | 3.07 KB |
| #5178 | SendAsync |
net6.0 | 4.41μs | 1.4ns | 5.4ns | 0.0308 | 0 | 0 | 2.18 KB |
| #5178 | SendAsync |
netcoreapp3.1 | 5.05μs | 1.65ns | 6.16ns | 0.0358 | 0 | 0 | 2.71 KB |
| #5178 | SendAsync |
net472 | 7.73μs | 3.46ns | 13.4ns | 0.486 | 0 | 0 | 3.07 KB |
Benchmarks.Trace.ILoggerBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 1.44μs | 0.657ns | 2.46ns | 0.0238 | 0 | 0 | 1.68 KB |
| master | EnrichedLog |
netcoreapp3.1 | 2.2μs | 0.864ns | 3.23ns | 0.0231 | 0 | 0 | 1.68 KB |
| master | EnrichedLog |
net472 | 2.58μs | 3.58ns | 13.4ns | 0.254 | 0 | 0 | 1.61 KB |
| #5178 | EnrichedLog |
net6.0 | 1.56μs | 1.07ns | 4ns | 0.0235 | 0 | 0 | 1.68 KB |
| #5178 | EnrichedLog |
netcoreapp3.1 | 2.25μs | 1.5ns | 5.42ns | 0.0228 | 0 | 0 | 1.68 KB |
| #5178 | EnrichedLog |
net472 | 2.78μs | 2.45ns | 9.17ns | 0.255 | 0 | 0 | 1.61 KB |
Benchmarks.Trace.Log4netBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 112μs | 107ns | 416ns | 0.0559 | 0 | 0 | 4.26 KB |
| master | EnrichedLog |
netcoreapp3.1 | 120μs | 190ns | 687ns | 0.0603 | 0 | 0 | 4.26 KB |
| master | EnrichedLog |
net472 | 152μs | 263ns | 1.02μs | 0.68 | 0.227 | 0 | 4.45 KB |
| #5178 | EnrichedLog |
net6.0 | 113μs | 140ns | 522ns | 0.0563 | 0 | 0 | 4.26 KB |
| #5178 | EnrichedLog |
netcoreapp3.1 | 119μs | 152ns | 589ns | 0 | 0 | 0 | 4.26 KB |
| #5178 | EnrichedLog |
net472 | 149μs | 184ns | 713ns | 0.67 | 0.223 | 0 | 4.44 KB |
Benchmarks.Trace.NLogBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 3.05μs | 0.998ns | 3.73ns | 0.0305 | 0 | 0 | 2.24 KB |
| master | EnrichedLog |
netcoreapp3.1 | 4.33μs | 1.26ns | 4.87ns | 0.0304 | 0 | 0 | 2.24 KB |
| master | EnrichedLog |
net472 | 4.98μs | 1.19ns | 4.46ns | 0.324 | 0 | 0 | 2.05 KB |
| #5178 | EnrichedLog |
net6.0 | 3.08μs | 1.87ns | 7ns | 0.0326 | 0 | 0 | 2.24 KB |
| #5178 | EnrichedLog |
netcoreapp3.1 | 4.14μs | 0.966ns | 3.61ns | 0.0309 | 0 | 0 | 2.24 KB |
| #5178 | EnrichedLog |
net472 | 4.84μs | 1.68ns | 6.52ns | 0.325 | 0 | 0 | 2.05 KB |
Benchmarks.Trace.RedisBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | SendReceive |
net6.0 | 1.42μs | 0.871ns | 3.26ns | 0.0163 | 0 | 0 | 1.19 KB |
| master | SendReceive |
netcoreapp3.1 | 1.83μs | 0.951ns | 3.68ns | 0.0165 | 0 | 0 | 1.19 KB |
| master | SendReceive |
net472 | 2.2μs | 2.91ns | 11.3ns | 0.19 | 0 | 0 | 1.2 KB |
| #5178 | SendReceive |
net6.0 | 1.49μs | 0.917ns | 3.43ns | 0.0164 | 0 | 0 | 1.19 KB |
| #5178 | SendReceive |
netcoreapp3.1 | 1.82μs | 1.14ns | 4.43ns | 0.0163 | 0 | 0 | 1.19 KB |
| #5178 | SendReceive |
net472 | 2.2μs | 0.986ns | 3.82ns | 0.189 | 0 | 0 | 1.2 KB |
Benchmarks.Trace.SerilogBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EnrichedLog |
net6.0 | 2.61μs | 0.943ns | 3.4ns | 0.0221 | 0 | 0 | 1.58 KB |
| master | EnrichedLog |
netcoreapp3.1 | 3.99μs | 2.05ns | 7.66ns | 0.0218 | 0 | 0 | 1.63 KB |
| master | EnrichedLog |
net472 | 4.33μs | 2.16ns | 8.38ns | 0.32 | 0 | 0 | 2.02 KB |
| #5178 | EnrichedLog |
net6.0 | 2.73μs | 1.03ns | 4.01ns | 0.0218 | 0 | 0 | 1.58 KB |
| #5178 | EnrichedLog |
netcoreapp3.1 | 4.04μs | 1.15ns | 4.47ns | 0.0205 | 0 | 0 | 1.63 KB |
| #5178 | EnrichedLog |
net472 | 4.51μs | 1.93ns | 6.67ns | 0.32 | 0 | 0 | 2.02 KB |
Benchmarks.Trace.SpanBenchmark - Slower :warning: Same allocations :heavy_check_mark:
Slower :warning: in #5178
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0
1.302
466.31
607.19
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1
1.121
710.32
796.19
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartFinishSpan |
net6.0 | 466ns | 0.799ns | 3.09ns | 0.00796 | 0 | 0 | 568 B |
| master | StartFinishSpan |
netcoreapp3.1 | 711ns | 1.42ns | 5.49ns | 0.00777 | 0 | 0 | 568 B |
| master | StartFinishSpan |
net472 | 835ns | 1.49ns | 5.79ns | 0.0905 | 0 | 0 | 570 B |
| master | StartFinishScope |
net6.0 | 549ns | 1.29ns | 4.99ns | 0.00974 | 0 | 0 | 688 B |
| master | StartFinishScope |
netcoreapp3.1 | 819ns | 1.08ns | 4.05ns | 0.00917 | 0 | 0 | 688 B |
| master | StartFinishScope |
net472 | 1.05μs | 2.13ns | 8.24ns | 0.103 | 0 | 0 | 650 B |
| #5178 | StartFinishSpan |
net6.0 | 606ns | 1.13ns | 4.39ns | 0.00777 | 0 | 0 | 568 B |
| #5178 | StartFinishSpan |
netcoreapp3.1 | 796ns | 1.21ns | 4.51ns | 0.00765 | 0 | 0 | 568 B |
| #5178 | StartFinishSpan |
net472 | 763ns | 1.58ns | 6.12ns | 0.0902 | 0 | 0 | 570 B |
| #5178 | StartFinishScope |
net6.0 | 599ns | 1.16ns | 4.35ns | 0.0098 | 0 | 0 | 688 B |
| #5178 | StartFinishScope |
netcoreapp3.1 | 846ns | 1.4ns | 5.43ns | 0.00944 | 0 | 0 | 688 B |
| #5178 | StartFinishScope |
net472 | 1.01μs | 2.4ns | 9.29ns | 0.103 | 0 | 0 | 650 B |
Benchmarks.Trace.TraceAnnotationsBenchmark - Faster :tada: Same allocations :heavy_check_mark:
Faster :tada: in #5178
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0
1.163
696.97
599.12
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunOnMethodBegin |
net6.0 | 696ns | 1.08ns | 4.19ns | 0.0098 | 0 | 0 | 688 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 966ns | 1.38ns | 5.17ns | 0.0094 | 0 | 0 | 688 B |
| master | RunOnMethodBegin |
net472 | 1.12μs | 2.7ns | 10.4ns | 0.103 | 0 | 0 | 650 B |
| #5178 | RunOnMethodBegin |
net6.0 | 599ns | 0.827ns | 3.2ns | 0.00972 | 0 | 0 | 688 B |
| #5178 | RunOnMethodBegin |
netcoreapp3.1 | 968ns | 2.72ns | 10.2ns | 0.00933 | 0 | 0 | 688 B |
| #5178 | RunOnMethodBegin |
net472 | 1.06μs | 1.95ns | 7.54ns | 0.103 | 0 | 0 | 650 B |
Benchmarks Report for appsec :snail:
Benchmarks for #5178 compared to master:
- 1 benchmarks are slower, with geometric mean 1.400
- 1 benchmarks have fewer allocations
- 3 benchmarks have more allocations
The following thresholds were used for comparing the benchmark speeds:
- Mann–Whitney U test with statistical test for significance of 5%
- Only results indicating a difference greater than 10% and 0.3 ns are considered.
Allocation changes below 0.5% are ignored.
Benchmark details
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Slower :warning: Same allocations :heavy_check_mark:
Slower :warning: in #5178
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody‑net472
1.400
163.05
228.30
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | AllCycleSimpleBody |
net6.0 | 71.9μs | 95.3ns | 369ns | 0.0438 | 0 | 0 | 5.99 KB |
| master | AllCycleSimpleBody |
netcoreapp3.1 | 61.5μs | 82.2ns | 318ns | 0.0615 | 0 | 0 | 6.93 KB |
| master | AllCycleSimpleBody |
net472 | 49.1μs | 42.9ns | 160ns | 1.32 | 0 | 0 | 8.32 KB |
| master | AllCycleMoreComplexBody |
net6.0 | 77.9μs | 55.7ns | 193ns | 0.116 | 0 | 0 | 9.5 KB |
| master | AllCycleMoreComplexBody |
netcoreapp3.1 | 69.8μs | 93.4ns | 362ns | 0.14 | 0 | 0 | 10.35 KB |
| master | AllCycleMoreComplexBody |
net472 | 56.9μs | 82.2ns | 318ns | 1.87 | 0.0287 | 0 | 11.84 KB |
| master | ObjectExtractorSimpleBody |
net6.0 | 146ns | 0.0939ns | 0.351ns | 0.00397 | 0 | 0 | 280 B |
| master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 199ns | 0.133ns | 0.498ns | 0.00363 | 0 | 0 | 272 B |
| master | ObjectExtractorSimpleBody |
net472 | 163ns | 0.219ns | 0.849ns | 0.0446 | 0 | 0 | 281 B |
| master | ObjectExtractorMoreComplexBody |
net6.0 | 3.04μs | 2.2ns | 8.53ns | 0.0534 | 0 | 0 | 3.78 KB |
| master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 3.99μs | 1.54ns | 5.97ns | 0.0521 | 0 | 0 | 3.69 KB |
| master | ObjectExtractorMoreComplexBody |
net472 | 4.2μs | 2.06ns | 7.98ns | 0.602 | 0.0063 | 0 | 3.8 KB |
| #5178 | AllCycleSimpleBody |
net6.0 | 71.6μs | 96ns | 372ns | 0.0716 | 0 | 0 | 5.99 KB |
| #5178 | AllCycleSimpleBody |
netcoreapp3.1 | 61.9μs | 99.8ns | 386ns | 0.093 | 0 | 0 | 6.93 KB |
| #5178 | AllCycleSimpleBody |
net472 | 48.4μs | 111ns | 429ns | 1.31 | 0 | 0 | 8.32 KB |
| #5178 | AllCycleMoreComplexBody |
net6.0 | 78.1μs | 107ns | 413ns | 0.119 | 0 | 0 | 9.49 KB |
| #5178 | AllCycleMoreComplexBody |
netcoreapp3.1 | 69.5μs | 60.6ns | 227ns | 0.139 | 0 | 0 | 10.35 KB |
| #5178 | AllCycleMoreComplexBody |
net472 | 55.5μs | 90.3ns | 350ns | 1.86 | 0.0278 | 0 | 11.84 KB |
| #5178 | ObjectExtractorSimpleBody |
net6.0 | 143ns | 0.183ns | 0.709ns | 0.00394 | 0 | 0 | 280 B |
| #5178 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 201ns | 0.151ns | 0.586ns | 0.0037 | 0 | 0 | 272 B |
| #5178 | ObjectExtractorSimpleBody |
net472 | 228ns | 0.271ns | 1.05ns | 0.0446 | 0 | 0 | 281 B |
| #5178 | ObjectExtractorMoreComplexBody |
net6.0 | 3.06μs | 1.42ns | 5.14ns | 0.0532 | 0 | 0 | 3.78 KB |
| #5178 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 3.98μs | 2.45ns | 9.47ns | 0.0515 | 0 | 0 | 3.69 KB |
| #5178 | ObjectExtractorMoreComplexBody |
net472 | 3.82μs | 3.01ns | 10.9ns | 0.603 | 0.00574 | 0 | 3.8 KB |
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | EncodeArgs |
net6.0 | 40.1μs | 12.4ns | 47.8ns | 0.46 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
netcoreapp3.1 | 55.3μs | 37.5ns | 145ns | 0.438 | 0 | 0 | 32.4 KB |
| master | EncodeArgs |
net472 | 69.4μs | 28.8ns | 112ns | 5.15 | 0.0692 | 0 | 32.5 KB |
| master | EncodeLegacyArgs |
net6.0 | 78.1μs | 25.2ns | 94.4ns | 0 | 0 | 0 | 2.14 KB |
| master | EncodeLegacyArgs |
netcoreapp3.1 | 106μs | 55.7ns | 216ns | 0 | 0 | 0 | 2.14 KB |
| master | EncodeLegacyArgs |
net472 | 153μs | 83.9ns | 325ns | 0.306 | 0 | 0 | 2.15 KB |
| #5178 | EncodeArgs |
net6.0 | 39.1μs | 20.5ns | 79.6ns | 0.448 | 0 | 0 | 32.4 KB |
| #5178 | EncodeArgs |
netcoreapp3.1 | 56.1μs | 33.9ns | 131ns | 0.418 | 0 | 0 | 32.4 KB |
| #5178 | EncodeArgs |
net472 | 68.8μs | 31.9ns | 124ns | 5.14 | 0.0689 | 0 | 32.5 KB |
| #5178 | EncodeLegacyArgs |
net6.0 | 75.2μs | 65.6ns | 254ns | 0 | 0 | 0 | 2.14 KB |
| #5178 | EncodeLegacyArgs |
netcoreapp3.1 | 107μs | 66.1ns | 247ns | 0 | 0 | 0 | 2.14 KB |
| #5178 | EncodeLegacyArgs |
net472 | 152μs | 91.6ns | 355ns | 0.304 | 0 | 0 | 2.15 KB |
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed :heavy_check_mark: Same allocations :heavy_check_mark:
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunWafRealisticBenchmark |
net6.0 | 182μs | 183ns | 709ns | 0 | 0 | 0 | 2.13 KB |
| master | RunWafRealisticBenchmark |
netcoreapp3.1 | 195μs | 180ns | 650ns | 0 | 0 | 0 | 2.1 KB |
| master | RunWafRealisticBenchmark |
net472 | 215μs | 52.1ns | 202ns | 0.321 | 0 | 0 | 2.17 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net6.0 | 122μs | 67ns | 260ns | 0 | 0 | 0 | 1.37 KB |
| master | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 128μs | 133ns | 514ns | 0 | 0 | 0 | 1.36 KB |
| master | RunWafRealisticBenchmarkWithAttack |
net472 | 139μs | 59ns | 229ns | 0.208 | 0 | 0 | 1.39 KB |
| #5178 | RunWafRealisticBenchmark |
net6.0 | 182μs | 111ns | 413ns | 0 | 0 | 0 | 2.13 KB |
| #5178 | RunWafRealisticBenchmark |
netcoreapp3.1 | 193μs | 93.5ns | 337ns | 0 | 0 | 0 | 2.11 KB |
| #5178 | RunWafRealisticBenchmark |
net472 | 213μs | 123ns | 461ns | 0.319 | 0 | 0 | 2.17 KB |
| #5178 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 121μs | 123ns | 476ns | 0 | 0 | 0 | 1.37 KB |
| #5178 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 128μs | 134ns | 517ns | 0 | 0 | 0 | 1.36 KB |
| #5178 | RunWafRealisticBenchmarkWithAttack |
net472 | 140μs | 107ns | 414ns | 0.209 | 0 | 0 | 1.39 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed :heavy_check_mark: More allocations :warning:
More allocations :warning: in #5178
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
204.55 KB
249.06 KB
44.5 KB
21.76%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472
55.75 KB
59.39 KB
3.64 KB
6.53%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472
231.02 KB
234.73 KB
3.7 KB
1.60%
Fewer allocations :tada: in #5178
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
212.27 KB
202.17 KB
-10.1 KB
-4.76%
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StringConcatBenchmark |
net6.0 | 52.6μs | 218ns | 785ns | 0 | 0 | 0 | 43.44 KB |
| master | StringConcatBenchmark |
netcoreapp3.1 | 55.6μs | 398ns | 3.9μs | 0 | 0 | 0 | 42.64 KB |
| master | StringConcatBenchmark |
net472 | 37.6μs | 86.7ns | 313ns | 0 | 0 | 0 | 55.75 KB |
| master | StringConcatAspectBenchmark |
net6.0 | 295μs | 1.22μs | 4.4μs | 0 | 0 | 0 | 204.55 KB |
| master | StringConcatAspectBenchmark |
netcoreapp3.1 | 309μs | 1.39μs | 5.02μs | 0 | 0 | 0 | 212.27 KB |
| master | StringConcatAspectBenchmark |
net472 | 237μs | 1.28μs | 7.24μs | 0 | 0 | 0 | 231.02 KB |
| #5178 | StringConcatBenchmark |
net6.0 | 52.9μs | 173ns | 600ns | 0 | 0 | 0 | 43.44 KB |
| #5178 | StringConcatBenchmark |
netcoreapp3.1 | 61.2μs | 663ns | 6.53μs | 0 | 0 | 0 | 42.64 KB |
| #5178 | StringConcatBenchmark |
net472 | 38.1μs | 83.5ns | 312ns | 0 | 0 | 0 | 59.39 KB |
| #5178 | StringConcatAspectBenchmark |
net6.0 | 264μs | 4.39μs | 42.3μs | 0 | 0 | 0 | 249.06 KB |
| #5178 | StringConcatAspectBenchmark |
netcoreapp3.1 | 296μs | 1.53μs | 9.04μs | 0 | 0 | 0 | 202.17 KB |
| #5178 | StringConcatAspectBenchmark |
net472 | 240μs | 1.3μs | 8.24μs | 0 | 0 | 0 | 234.73 KB |
Datadog Report
Branch report: anna/asm-add-amzn-header
Commit report: 87fc464
Test service: dd-trace-dotnet
:white_check_mark: 0 Failed, 329938 Passed, 1504 Skipped, 49m 14.54s Wall Time