-
Notifications
You must be signed in to change notification settings - Fork 145
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
[tracing] add null checks when iterating headers in propagators #6460
base: master
Are you sure you want to change the base?
Conversation
Datadog ReportBranch report: ❌ 1 Failed (0 Known Flaky), 458117 Passed, 2818 Skipped, 19h 39m 26.49s Total Time ❌ Failed Tests (1)
|
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 (6460) - mean (69ms) : 64, 73
. : milestone, 69,
master - mean (68ms) : 66, 71
. : milestone, 68,
section CallTarget+Inlining+NGEN
This PR (6460) - mean (975ms) : 951, 999
. : milestone, 975,
master - mean (978ms) : 956, 999
. : milestone, 978,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6460) - mean (107ms) : 104, 110
. : milestone, 107,
master - mean (107ms) : 105, 109
. : milestone, 107,
section CallTarget+Inlining+NGEN
This PR (6460) - mean (679ms) : 663, 696
. : milestone, 679,
master - mean (678ms) : 667, 690
. : milestone, 678,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6460) - mean (91ms) : 89, 93
. : milestone, 91,
master - mean (91ms) : 88, 93
. : milestone, 91,
section CallTarget+Inlining+NGEN
This PR (6460) - mean (633ms) : 617, 649
. : milestone, 633,
master - mean (632ms) : 614, 650
. : milestone, 632,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6460) - mean (194ms) : 190, 199
. : milestone, 194,
master - mean (193ms) : 190, 197
. : milestone, 193,
section CallTarget+Inlining+NGEN
This PR (6460) - mean (1,101ms) : 1074, 1129
. : milestone, 1101,
master - mean (1,097ms) : 1071, 1122
. : milestone, 1097,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6460) - mean (279ms) : 271, 286
. : milestone, 279,
master - mean (279ms) : 272, 286
. : milestone, 279,
section CallTarget+Inlining+NGEN
This PR (6460) - mean (872ms) : 843, 902
. : milestone, 872,
master - mean (865ms) : 847, 883
. : milestone, 865,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6460) - mean (267ms) : 264, 270
. : milestone, 267,
master - mean (266ms) : 262, 270
. : milestone, 266,
section CallTarget+Inlining+NGEN
This PR (6460) - mean (849ms) : 820, 878
. : milestone, 849,
master - mean (849ms) : 817, 881
. : milestone, 849,
|
Benchmarks Report for tracer 🐌Benchmarks for #6460 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 ✔️ Fewer allocations 🎉
|
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 41.85 KB | 41.52 KB | -327 B | -0.78% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | WriteAndFlushEnrichedTraces |
net6.0 | 587μs | 2.95μs | 18.2μs | 0.658 | 0 | 0 | 41.85 KB |
master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 691μs | 3.67μs | 19.4μs | 0.329 | 0 | 0 | 41.72 KB |
master | WriteAndFlushEnrichedTraces |
net472 | 842μs | 3.63μs | 13.6μs | 8.17 | 2.45 | 0.408 | 53.28 KB |
#6460 | WriteAndFlushEnrichedTraces |
net6.0 | 565μs | 3.12μs | 18.5μs | 0.568 | 0 | 0 | 41.52 KB |
#6460 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 716μs | 4.15μs | 35.5μs | 0.327 | 0 | 0 | 41.86 KB |
#6460 | WriteAndFlushEnrichedTraces |
net472 | 837μs | 3.5μs | 13.5μs | 8.13 | 2.57 | 0.428 | 53.28 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.22μs | 1.1ns | 4.26ns | 0.0139 | 0 | 0 | 1.02 KB |
master | ExecuteNonQuery |
netcoreapp3.1 | 1.75μs | 1.76ns | 6.83ns | 0.014 | 0 | 0 | 1.02 KB |
master | ExecuteNonQuery |
net472 | 2.06μs | 1.51ns | 5.85ns | 0.156 | 0.00103 | 0 | 987 B |
#6460 | ExecuteNonQuery |
net6.0 | 1.25μs | 0.698ns | 2.7ns | 0.0143 | 0 | 0 | 1.02 KB |
#6460 | ExecuteNonQuery |
netcoreapp3.1 | 1.73μs | 1.81ns | 6.79ns | 0.0131 | 0 | 0 | 1.02 KB |
#6460 | ExecuteNonQuery |
net472 | 2.14μs | 2.41ns | 9.34ns | 0.156 | 0.00108 | 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.37μs | 0.999ns | 3.74ns | 0.0142 | 0 | 0 | 976 B |
master | CallElasticsearch |
netcoreapp3.1 | 1.53μs | 0.834ns | 3.12ns | 0.0129 | 0 | 0 | 976 B |
master | CallElasticsearch |
net472 | 2.56μs | 1.03ns | 3.85ns | 0.158 | 0 | 0 | 995 B |
master | CallElasticsearchAsync |
net6.0 | 1.33μs | 0.652ns | 2.52ns | 0.0133 | 0 | 0 | 952 B |
master | CallElasticsearchAsync |
netcoreapp3.1 | 1.71μs | 2.41ns | 9.34ns | 0.0136 | 0 | 0 | 1.02 KB |
master | CallElasticsearchAsync |
net472 | 2.62μs | 1.15ns | 4.46ns | 0.166 | 0 | 0 | 1.05 KB |
#6460 | CallElasticsearch |
net6.0 | 1.24μs | 0.441ns | 1.65ns | 0.0136 | 0 | 0 | 976 B |
#6460 | CallElasticsearch |
netcoreapp3.1 | 1.53μs | 1.24ns | 4.66ns | 0.013 | 0 | 0 | 976 B |
#6460 | CallElasticsearch |
net472 | 2.53μs | 1.56ns | 5.63ns | 0.157 | 0 | 0 | 995 B |
#6460 | CallElasticsearchAsync |
net6.0 | 1.31μs | 0.473ns | 1.83ns | 0.0132 | 0 | 0 | 952 B |
#6460 | CallElasticsearchAsync |
netcoreapp3.1 | 1.64μs | 1.07ns | 4ns | 0.0132 | 0 | 0 | 1.02 KB |
#6460 | CallElasticsearchAsync |
net472 | 2.74μs | 1.89ns | 7.32ns | 0.167 | 0 | 0 | 1.05 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.29μs | 0.716ns | 2.68ns | 0.0129 | 0 | 0 | 952 B |
master | ExecuteAsync |
netcoreapp3.1 | 1.58μs | 0.828ns | 3.21ns | 0.0128 | 0 | 0 | 952 B |
master | ExecuteAsync |
net472 | 1.82μs | 0.244ns | 0.911ns | 0.145 | 0 | 0 | 915 B |
#6460 | ExecuteAsync |
net6.0 | 1.21μs | 0.717ns | 2.68ns | 0.0134 | 0 | 0 | 952 B |
#6460 | ExecuteAsync |
netcoreapp3.1 | 1.67μs | 0.842ns | 3.04ns | 0.0126 | 0 | 0 | 952 B |
#6460 | ExecuteAsync |
net472 | 1.85μs | 1.13ns | 4.38ns | 0.144 | 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 | 4.56μs | 2.29ns | 8.56ns | 0.032 | 0 | 0 | 2.31 KB |
master | SendAsync |
netcoreapp3.1 | 5.37μs | 2.37ns | 9.16ns | 0.0376 | 0 | 0 | 2.85 KB |
master | SendAsync |
net472 | 7.36μs | 2.15ns | 8.06ns | 0.493 | 0 | 0 | 3.12 KB |
#6460 | SendAsync |
net6.0 | 4.43μs | 1.81ns | 6.76ns | 0.0309 | 0 | 0 | 2.31 KB |
#6460 | SendAsync |
netcoreapp3.1 | 5.1μs | 1.91ns | 7.15ns | 0.0384 | 0 | 0 | 2.85 KB |
#6460 | SendAsync |
net472 | 7.43μs | 4.67ns | 18.1ns | 0.494 | 0 | 0 | 3.12 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 | 1.54μs | 0.984ns | 3.68ns | 0.0232 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
netcoreapp3.1 | 2.17μs | 1.85ns | 6.93ns | 0.0216 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
net472 | 2.67μs | 2.79ns | 10.8ns | 0.249 | 0 | 0 | 1.57 KB |
#6460 | EnrichedLog |
net6.0 | 1.46μs | 0.802ns | 3.11ns | 0.0232 | 0 | 0 | 1.64 KB |
#6460 | EnrichedLog |
netcoreapp3.1 | 2.31μs | 0.869ns | 3.36ns | 0.0219 | 0 | 0 | 1.64 KB |
#6460 | EnrichedLog |
net472 | 2.62μs | 0.847ns | 3.17ns | 0.249 | 0 | 0 | 1.57 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 | 117μs | 224ns | 869ns | 0.0583 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
netcoreapp3.1 | 122μs | 119ns | 444ns | 0 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
net472 | 153μs | 148ns | 572ns | 0.689 | 0.23 | 0 | 4.46 KB |
#6460 | EnrichedLog |
net6.0 | 118μs | 200ns | 776ns | 0.0591 | 0 | 0 | 4.28 KB |
#6460 | EnrichedLog |
netcoreapp3.1 | 124μs | 130ns | 469ns | 0 | 0 | 0 | 4.28 KB |
#6460 | EnrichedLog |
net472 | 153μs | 155ns | 602ns | 0.689 | 0.23 | 0 | 4.46 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 | 3.05μs | 1.22ns | 4.74ns | 0.0304 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
netcoreapp3.1 | 4.28μs | 1.57ns | 5.86ns | 0.03 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
net472 | 4.97μs | 2.99ns | 11.2ns | 0.32 | 0 | 0 | 2.02 KB |
#6460 | EnrichedLog |
net6.0 | 2.99μs | 1.26ns | 4.7ns | 0.0315 | 0 | 0 | 2.2 KB |
#6460 | EnrichedLog |
netcoreapp3.1 | 4.29μs | 1.5ns | 5.79ns | 0.03 | 0 | 0 | 2.2 KB |
#6460 | EnrichedLog |
net472 | 4.99μs | 1.43ns | 5.54ns | 0.319 | 0 | 0 | 2.02 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.36μs | 1.04ns | 4.01ns | 0.0156 | 0 | 0 | 1.14 KB |
master | SendReceive |
netcoreapp3.1 | 1.75μs | 0.955ns | 3.57ns | 0.0149 | 0 | 0 | 1.14 KB |
master | SendReceive |
net472 | 2.11μs | 1.62ns | 6.27ns | 0.183 | 0 | 0 | 1.16 KB |
#6460 | SendReceive |
net6.0 | 1.36μs | 0.866ns | 3.36ns | 0.0156 | 0 | 0 | 1.14 KB |
#6460 | SendReceive |
netcoreapp3.1 | 1.79μs | 1.4ns | 5.04ns | 0.0153 | 0 | 0 | 1.14 KB |
#6460 | SendReceive |
net472 | 2.12μs | 0.583ns | 2.26ns | 0.183 | 0 | 0 | 1.16 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 | 2.78μs | 3.67ns | 14.2ns | 0.0223 | 0 | 0 | 1.6 KB |
master | EnrichedLog |
netcoreapp3.1 | 4.14μs | 2.35ns | 9.1ns | 0.0207 | 0 | 0 | 1.65 KB |
master | EnrichedLog |
net472 | 4.41μs | 2.21ns | 8.54ns | 0.323 | 0 | 0 | 2.04 KB |
#6460 | EnrichedLog |
net6.0 | 2.79μs | 1.13ns | 4.25ns | 0.0224 | 0 | 0 | 1.6 KB |
#6460 | EnrichedLog |
netcoreapp3.1 | 4.01μs | 1.77ns | 6.38ns | 0.0221 | 0 | 0 | 1.65 KB |
#6460 | EnrichedLog |
net472 | 4.33μs | 1.52ns | 5.7ns | 0.322 | 0 | 0 | 2.04 KB |
Benchmarks.Trace.SpanBenchmark - Faster 🎉 Same allocations ✔️
Faster 🎉 in #6460
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0
1.129
461.27
408.45
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 | 1.129 | 461.27 | 408.45 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 461ns | 0.154ns | 0.597ns | 0.00811 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 562ns | 0.262ns | 0.98ns | 0.00786 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 692ns | 0.312ns | 1.21ns | 0.0916 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 487ns | 0.597ns | 2.31ns | 0.00982 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 693ns | 0.404ns | 1.46ns | 0.00957 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 870ns | 0.632ns | 2.36ns | 0.104 | 0 | 0 | 658 B |
#6460 | StartFinishSpan |
net6.0 | 409ns | 0.25ns | 0.936ns | 0.00803 | 0 | 0 | 576 B |
#6460 | StartFinishSpan |
netcoreapp3.1 | 618ns | 0.899ns | 3.48ns | 0.00771 | 0 | 0 | 576 B |
#6460 | StartFinishSpan |
net472 | 659ns | 0.373ns | 1.44ns | 0.0918 | 0 | 0 | 578 B |
#6460 | StartFinishScope |
net6.0 | 534ns | 0.302ns | 1.17ns | 0.00963 | 0 | 0 | 696 B |
#6460 | StartFinishScope |
netcoreapp3.1 | 667ns | 0.421ns | 1.63ns | 0.00945 | 0 | 0 | 696 B |
#6460 | StartFinishScope |
net472 | 808ns | 0.844ns | 3.27ns | 0.104 | 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 | 669ns | 2.16ns | 8.38ns | 0.00964 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 970ns | 1.09ns | 4.21ns | 0.00928 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.08μs | 0.479ns | 1.86ns | 0.104 | 0 | 0 | 658 B |
#6460 | RunOnMethodBegin |
net6.0 | 633ns | 0.357ns | 1.34ns | 0.00978 | 0 | 0 | 696 B |
#6460 | RunOnMethodBegin |
netcoreapp3.1 | 932ns | 0.34ns | 1.27ns | 0.00926 | 0 | 0 | 696 B |
#6460 | RunOnMethodBegin |
net472 | 1.08μs | 0.668ns | 2.59ns | 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 (6460) (11.204M) : 0, 11203962
master (11.249M) : 0, 11248712
benchmarks/2.9.0 (11.033M) : 0, 11032866
section Automatic
This PR (6460) (7.138M) : 0, 7138385
master (7.347M) : 0, 7347049
benchmarks/2.9.0 (7.786M) : 0, 7785853
section Trace stats
master (7.654M) : 0, 7654087
section Manual
master (11.190M) : 0, 11189743
section Manual + Automatic
This PR (6460) (6.590M) : 0, 6589779
master (6.679M) : 0, 6679400
section DD_TRACE_ENABLED=0
master (10.188M) : 0, 10188440
gantt
title Throughput Linux arm64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (6460) (9.616M) : 0, 9615615
master (9.530M) : 0, 9530088
benchmarks/2.9.0 (9.495M) : 0, 9494821
section Automatic
This PR (6460) (6.411M) : 0, 6411024
master (6.231M) : 0, 6230985
section Trace stats
master (6.683M) : 0, 6683249
section Manual
master (9.386M) : 0, 9386293
section Manual + Automatic
This PR (6460) (5.924M) : 0, 5924341
master (5.912M) : 0, 5912138
section DD_TRACE_ENABLED=0
master (8.814M) : 0, 8813827
gantt
title Throughput Windows x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (6460) (10.229M) : 0, 10229010
master (10.112M) : 0, 10112273
benchmarks/2.9.0 (10.020M) : 0, 10019592
section Automatic
This PR (6460) (6.581M) : 0, 6581383
master (6.311M) : 0, 6310709
benchmarks/2.9.0 (7.255M) : 0, 7255257
section Trace stats
master (7.120M) : 0, 7119600
section Manual
master (9.566M) : 0, 9565510
section Manual + Automatic
This PR (6460) (6.215M) : 0, 6214602
master (6.208M) : 0, 6208407
section DD_TRACE_ENABLED=0
master (9.215M) : 0, 9215486
|
Summary of changes
Check if
IEnumerable<string>
(header values) isnull
before iterating over it inParseUtility
.Reason for change
Users can pass a delegate to
SpanContextExtractor
which returnsnull
. For example:I noticed this while using manual instrumentation for system tests. The easy workaround is add a null-coalescing operator:
Implementation details
Test coverage
TODO
Other details
n/a