[APMAPI-473] Making DD_HTTP_*_ERROR_STATUSES Config Keys Consistent#6095
Conversation
Execution-Time Benchmarks Report ⏱️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:
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 (6095) - mean (70ms) : 68, 72
. : milestone, 70,
master - mean (70ms) : 68, 73
. : milestone, 70,
section CallTarget+Inlining+NGEN
This PR (6095) - mean (1,109ms) : 1090, 1127
. : milestone, 1109,
master - mean (1,104ms) : 1073, 1135
. : milestone, 1104,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6095) - mean (109ms) : 105, 112
. : milestone, 109,
master - mean (109ms) : 106, 112
. : milestone, 109,
section CallTarget+Inlining+NGEN
This PR (6095) - mean (772ms) : 758, 785
. : milestone, 772,
master - mean (772ms) : 754, 789
. : milestone, 772,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6095) - mean (92ms) : 89, 96
. : milestone, 92,
master - mean (93ms) : 90, 95
. : milestone, 93,
section CallTarget+Inlining+NGEN
This PR (6095) - mean (734ms) : 714, 753
. : milestone, 734,
master - mean (732ms) : 714, 750
. : milestone, 732,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6095) - mean (190ms) : 186, 194
. : milestone, 190,
master - mean (191ms) : 188, 194
. : milestone, 191,
section CallTarget+Inlining+NGEN
This PR (6095) - mean (1,195ms) : 1173, 1217
. : milestone, 1195,
master - mean (1,199ms) : 1177, 1222
. : milestone, 1199,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6095) - mean (276ms) : 272, 280
. : milestone, 276,
master - mean (276ms) : 272, 281
. : milestone, 276,
section CallTarget+Inlining+NGEN
This PR (6095) - mean (939ms) : 919, 959
. : milestone, 939,
master - mean (937ms) : 921, 953
. : milestone, 937,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6095) - mean (265ms) : 261, 269
. : milestone, 265,
master - mean (265ms) : 261, 269
. : milestone, 265,
section CallTarget+Inlining+NGEN
This PR (6095) - mean (925ms) : 904, 946
. : milestone, 925,
master - mean (931ms) : 912, 950
. : milestone, 931,
|
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
Benchmarks Report for tracer 🐌Benchmarks for #6095 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.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SpanBenchmark - Faster 🎉 Same allocations ✔️
|
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 | 1.120 | 537.67 | 479.89 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | StartFinishSpan |
net6.0 | 400ns | 0.209ns | 0.808ns | 0.00795 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 610ns | 0.328ns | 1.27ns | 0.00792 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 720ns | 0.285ns | 1.1ns | 0.0916 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 537ns | 0.35ns | 1.35ns | 0.00984 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 752ns | 0.407ns | 1.58ns | 0.0096 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 839ns | 0.46ns | 1.66ns | 0.104 | 0 | 0 | 658 B |
| #6095 | StartFinishSpan |
net6.0 | 391ns | 0.0888ns | 0.32ns | 0.00809 | 0 | 0 | 576 B |
| #6095 | StartFinishSpan |
netcoreapp3.1 | 605ns | 0.194ns | 0.726ns | 0.00787 | 0 | 0 | 576 B |
| #6095 | StartFinishSpan |
net472 | 681ns | 0.636ns | 2.38ns | 0.0918 | 0 | 0 | 578 B |
| #6095 | StartFinishScope |
net6.0 | 480ns | 0.15ns | 0.562ns | 0.00987 | 0 | 0 | 696 B |
| #6095 | StartFinishScope |
netcoreapp3.1 | 679ns | 0.418ns | 1.56ns | 0.00949 | 0 | 0 | 696 B |
| #6095 | StartFinishScope |
net472 | 861ns | 0.373ns | 1.45ns | 0.105 | 0 | 0 | 658 B |
Benchmarks.Trace.TraceAnnotationsBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #6095
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0
1.133
587.24
665.28
| Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 | 1.133 | 587.24 | 665.28 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunOnMethodBegin |
net6.0 | 587ns | 0.183ns | 0.707ns | 0.00972 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 883ns | 0.45ns | 1.74ns | 0.0093 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.16μs | 0.732ns | 2.84ns | 0.104 | 0 | 0 | 658 B |
| #6095 | RunOnMethodBegin |
net6.0 | 666ns | 0.215ns | 0.805ns | 0.0097 | 0 | 0 | 696 B |
| #6095 | RunOnMethodBegin |
netcoreapp3.1 | 940ns | 1.35ns | 5.21ns | 0.00938 | 0 | 0 | 696 B |
| #6095 | RunOnMethodBegin |
net472 | 1.09μs | 0.643ns | 2.49ns | 0.104 | 0 | 0 | 658 B |
Throughput/Crank Report ⚡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 (6095) (10.989M) : 0, 10988793
master (11.010M) : 0, 11009750
benchmarks/2.9.0 (11.081M) : 0, 11080577
section Automatic
This PR (6095) (7.279M) : 0, 7278552
master (7.342M) : 0, 7341764
benchmarks/2.9.0 (7.732M) : 0, 7732233
section Trace stats
master (7.612M) : 0, 7611509
section Manual
master (11.036M) : 0, 11035988
section Manual + Automatic
This PR (6095) (6.787M) : 0, 6786865
master (6.787M) : 0, 6786622
section DD_TRACE_ENABLED=0
master (10.197M) : 0, 10197476
gantt
title Throughput Linux arm64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (6095) (9.497M) : 0, 9497088
benchmarks/2.9.0 (9.798M) : 0, 9798067
section Automatic
This PR (6095) (6.621M) : 0, 6620737
section Manual + Automatic
This PR (6095) (6.128M) : 0, 6127997
gantt
title Throughput Windows x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (6095) (10.387M) : 0, 10386680
master (9.928M) : 0, 9927889
benchmarks/2.9.0 (10.067M) : 0, 10067315
section Automatic
This PR (6095) (6.590M) : 0, 6590068
master (6.677M) : 0, 6676729
benchmarks/2.9.0 (7.552M) : 0, 7552193
section Trace stats
master (7.399M) : 0, 7399205
section Manual
master (10.064M) : 0, 10063510
section Manual + Automatic
This PR (6095) (6.126M) : 0, 6125711
master (6.276M) : 0, 6276469
section DD_TRACE_ENABLED=0
master (9.331M) : 0, 9330779
|
bouwkast
left a comment
There was a problem hiding this comment.
Looks good, just some test nitpicks
| public HttpMessageHandlerTests(ITestOutputHelper output) | ||
| : base("HttpMessageHandler", output) | ||
| { | ||
| SetEnvironmentVariable("DD_HTTP_CLIENT_ERROR_STATUSES", "400-499, 502,-343,11-53, 500-500-200"); |
There was a problem hiding this comment.
Wondering if we should still have integration tests for the deprecated ones to validate that they do still work?
There was a problem hiding this comment.
(but if I recall this test suite is quite large)
There was a problem hiding this comment.
Yeah since the change was only to the name I hoped adding the test for asserting the precedence was enough since they check for the ranges in other tests too: https://github.com/DataDog/dd-trace-dotnet/blob/7fa9adde56eb12badda28c82929e7f14d56b8d82/tracer/test/Datadog.Trace.Tests/Configuration/TracerSettingsTests.cs
Since we are not deprecating the env var I can leave it there in that line for testing porpuses.
Summary of changes
DD_TRACE_HTTP_SERVER_ERROR_STATUSES&DD_TRACE_HTTP_CLIENT_ERROR_STATUSESconfig keys and updated telemetry key used as well.DD_HTTP_SERVER_ERROR_STATUSES&DD_HTTP_CLIENT_ERROR_STATUSESconfig keys to deprecated.Test coverage
Added 2 tests to check the outcome of both env vars being set together or by themselves on the existing
TracerSettingsTestsclass with the new ones taking precedence.Other details