Normalize the environment variable names used by crashtracking (#5898 -> v2)#5936
Conversation
Normalize the environment variable names used by crashtracking. `DD_CRASHTRACKING_*`: environment variables expected to be set by the customers. Currently: - `DD_CRASHTRACKING_ENABLED`: enables or disables crashtracking (default: enabled) `DD_INTERNAL_CRASHTRACKING_*`: environment variables used by the tracer infrastructure and/or tests. Currently: - `DD_INTERNAL_CRASHTRACKING_PASSTHROUGH`: automatically set to decide whether the real createdump should be called or not - `DD_INTERNAL_CRASHTRACKING_OUTPUT`: save the crash report to a file instead of using telemetry Now that other languages are implementing the feature, it's important to have consistent names. `DD_TRACE_CRASH_HANDLER` is not needed anymore, removed it. Removed the profiler tests that relied on `DD_TRACE_CRASH_HANDLER` (they're not needed now that we have crashtracking tests). The existing tests were updated.
Datadog ReportBranch report: ✅ 0 Failed, 344226 Passed, 2050 Skipped, 15h 33m 20.67s Total Time |
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 (5936) - mean (74ms) : 65, 83
. : milestone, 74,
section CallTarget+Inlining+NGEN
This PR (5936) - mean (1,026ms) : 1010, 1041
. : milestone, 1026,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5936) - mean (110ms) : 107, 113
. : milestone, 110,
section CallTarget+Inlining+NGEN
This PR (5936) - mean (708ms) : 689, 727
. : milestone, 708,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5936) - mean (93ms) : 90, 96
. : milestone, 93,
section CallTarget+Inlining+NGEN
This PR (5936) - mean (666ms) : 646, 686
. : milestone, 666,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5936) - mean (192ms) : 188, 195
. : milestone, 192,
section CallTarget+Inlining+NGEN
This PR (5936) - mean (1,111ms) : 1085, 1136
. : milestone, 1111,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5936) - mean (275ms) : 270, 280
. : milestone, 275,
section CallTarget+Inlining+NGEN
This PR (5936) - mean (878ms) : 853, 903
. : milestone, 878,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5936) - mean (265ms) : 261, 270
. : milestone, 265,
section CallTarget+Inlining+NGEN
This PR (5936) - mean (865ms) : 836, 893
. : milestone, 865,
|
Benchmarks Report for tracer 🐌Benchmarks for #5936 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 - Faster 🎉 Same allocations ✔️
|
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery‑net6.0 | 1.169 | 1,393.67 | 1,192.48 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | ExecuteNonQuery |
net6.0 | 1.39μs | 0.903ns | 3.5ns | 0.0139 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
netcoreapp3.1 | 1.74μs | 1.3ns | 5.03ns | 0.014 | 0 | 0 | 1.02 KB |
| master | ExecuteNonQuery |
net472 | 2.07μs | 2.93ns | 11.4ns | 0.156 | 0 | 0 | 987 B |
| #5936 | ExecuteNonQuery |
net6.0 | 1.19μs | 0.654ns | 2.45ns | 0.0145 | 0 | 0 | 1.02 KB |
| #5936 | ExecuteNonQuery |
netcoreapp3.1 | 1.7μs | 0.747ns | 2.89ns | 0.0136 | 0 | 0 | 1.02 KB |
| #5936 | ExecuteNonQuery |
net472 | 1.99μs | 1.18ns | 4.55ns | 0.157 | 0 | 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.22μs | 1.52ns | 5.7ns | 0.0138 | 0 | 0 | 976 B |
| master | CallElasticsearch |
netcoreapp3.1 | 1.61μs | 3.11ns | 12.1ns | 0.0131 | 0 | 0 | 976 B |
| master | CallElasticsearch |
net472 | 2.4μs | 1.63ns | 6.32ns | 0.158 | 0 | 0 | 995 B |
| master | CallElasticsearchAsync |
net6.0 | 1.2μs | 0.715ns | 2.68ns | 0.0132 | 0 | 0 | 952 B |
| master | CallElasticsearchAsync |
netcoreapp3.1 | 1.61μs | 0.613ns | 2.3ns | 0.0137 | 0 | 0 | 1.02 KB |
| master | CallElasticsearchAsync |
net472 | 2.57μs | 1.35ns | 5.24ns | 0.167 | 0 | 0 | 1.05 KB |
| #5936 | CallElasticsearch |
net6.0 | 1.21μs | 0.726ns | 2.72ns | 0.0133 | 0 | 0 | 976 B |
| #5936 | CallElasticsearch |
netcoreapp3.1 | 1.49μs | 0.601ns | 2.33ns | 0.0127 | 0 | 0 | 976 B |
| #5936 | CallElasticsearch |
net472 | 2.43μs | 0.818ns | 2.95ns | 0.157 | 0 | 0 | 995 B |
| #5936 | CallElasticsearchAsync |
net6.0 | 1.15μs | 0.929ns | 3.48ns | 0.0132 | 0 | 0 | 952 B |
| #5936 | CallElasticsearchAsync |
netcoreapp3.1 | 1.55μs | 0.779ns | 2.91ns | 0.0141 | 0 | 0 | 1.02 KB |
| #5936 | CallElasticsearchAsync |
net472 | 2.61μs | 1.94ns | 7.01ns | 0.167 | 0.0013 | 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.27μs | 1.09ns | 4.08ns | 0.0133 | 0 | 0 | 952 B |
| master | ExecuteAsync |
netcoreapp3.1 | 1.65μs | 0.858ns | 3.21ns | 0.0125 | 0 | 0 | 952 B |
| master | ExecuteAsync |
net472 | 1.66μs | 0.384ns | 1.44ns | 0.145 | 0 | 0 | 915 B |
| #5936 | ExecuteAsync |
net6.0 | 1.32μs | 0.743ns | 2.88ns | 0.0132 | 0 | 0 | 952 B |
| #5936 | ExecuteAsync |
netcoreapp3.1 | 1.67μs | 1.05ns | 3.92ns | 0.0125 | 0 | 0 | 952 B |
| #5936 | ExecuteAsync |
net472 | 1.84μs | 0.458ns | 1.77ns | 0.145 | 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.34μs | 2.08ns | 7.8ns | 0.0304 | 0 | 0 | 2.22 KB |
| master | SendAsync |
netcoreapp3.1 | 5.08μs | 1.51ns | 5.64ns | 0.0357 | 0 | 0 | 2.76 KB |
| master | SendAsync |
net472 | 7.85μs | 2.83ns | 11ns | 0.497 | 0 | 0 | 3.15 KB |
| #5936 | SendAsync |
net6.0 | 4.15μs | 1.57ns | 5.86ns | 0.0315 | 0 | 0 | 2.22 KB |
| #5936 | SendAsync |
netcoreapp3.1 | 5μs | 2.72ns | 10.5ns | 0.0374 | 0 | 0 | 2.76 KB |
| #5936 | SendAsync |
net472 | 7.85μs | 2.21ns | 7.97ns | 0.498 | 0 | 0 | 3.15 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.49μs | 0.763ns | 2.96ns | 0.0232 | 0 | 0 | 1.64 KB |
| master | EnrichedLog |
netcoreapp3.1 | 2.24μs | 1.61ns | 6.02ns | 0.0223 | 0 | 0 | 1.64 KB |
| master | EnrichedLog |
net472 | 2.65μs | 1.83ns | 6.59ns | 0.249 | 0 | 0 | 1.57 KB |
| #5936 | EnrichedLog |
net6.0 | 1.55μs | 0.541ns | 2.02ns | 0.0226 | 0 | 0 | 1.64 KB |
| #5936 | EnrichedLog |
netcoreapp3.1 | 2.24μs | 5.87ns | 22ns | 0.0223 | 0 | 0 | 1.64 KB |
| #5936 | EnrichedLog |
net472 | 2.65μs | 3.04ns | 10.5ns | 0.248 | 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 | 116μs | 200ns | 774ns | 0.0583 | 0 | 0 | 4.28 KB |
| master | EnrichedLog |
netcoreapp3.1 | 120μs | 265ns | 1.02μs | 0 | 0 | 0 | 4.28 KB |
| master | EnrichedLog |
net472 | 151μs | 201ns | 778ns | 0.674 | 0.225 | 0 | 4.46 KB |
| #5936 | EnrichedLog |
net6.0 | 114μs | 186ns | 722ns | 0.0568 | 0 | 0 | 4.28 KB |
| #5936 | EnrichedLog |
netcoreapp3.1 | 119μs | 231ns | 894ns | 0 | 0 | 0 | 4.28 KB |
| #5936 | EnrichedLog |
net472 | 148μs | 378ns | 1.46μs | 0.668 | 0.223 | 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.01μs | 0.751ns | 2.91ns | 0.0301 | 0 | 0 | 2.2 KB |
| master | EnrichedLog |
netcoreapp3.1 | 4.3μs | 1.37ns | 5.32ns | 0.0301 | 0 | 0 | 2.2 KB |
| master | EnrichedLog |
net472 | 4.91μs | 1.48ns | 5.73ns | 0.319 | 0 | 0 | 2.02 KB |
| #5936 | EnrichedLog |
net6.0 | 2.96μs | 0.924ns | 3.33ns | 0.0311 | 0 | 0 | 2.2 KB |
| #5936 | EnrichedLog |
netcoreapp3.1 | 4.25μs | 1.49ns | 5.57ns | 0.0296 | 0 | 0 | 2.2 KB |
| #5936 | EnrichedLog |
net472 | 4.91μs | 1.48ns | 5.75ns | 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.33μs | 0.667ns | 2.58ns | 0.016 | 0 | 0 | 1.14 KB |
| master | SendReceive |
netcoreapp3.1 | 1.82μs | 1.35ns | 5.22ns | 0.0154 | 0 | 0 | 1.14 KB |
| master | SendReceive |
net472 | 2.21μs | 2.01ns | 7.77ns | 0.183 | 0.00111 | 0 | 1.16 KB |
| #5936 | SendReceive |
net6.0 | 1.39μs | 0.602ns | 2.33ns | 0.016 | 0 | 0 | 1.14 KB |
| #5936 | SendReceive |
netcoreapp3.1 | 1.73μs | 1.01ns | 3.92ns | 0.0149 | 0 | 0 | 1.14 KB |
| #5936 | SendReceive |
net472 | 2.13μs | 2.6ns | 10.1ns | 0.183 | 0.00106 | 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.88μs | 0.836ns | 3.24ns | 0.0216 | 0 | 0 | 1.6 KB |
| master | EnrichedLog |
netcoreapp3.1 | 4μs | 1.16ns | 4.48ns | 0.022 | 0 | 0 | 1.65 KB |
| master | EnrichedLog |
net472 | 4.32μs | 2.36ns | 9.14ns | 0.323 | 0 | 0 | 2.04 KB |
| #5936 | EnrichedLog |
net6.0 | 2.75μs | 0.731ns | 2.73ns | 0.022 | 0 | 0 | 1.6 KB |
| #5936 | EnrichedLog |
netcoreapp3.1 | 3.75μs | 1.33ns | 5.13ns | 0.0225 | 0 | 0 | 1.65 KB |
| #5936 | EnrichedLog |
net472 | 4.27μs | 2.61ns | 9.77ns | 0.322 | 0 | 0 | 2.04 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 | 403ns | 0.148ns | 0.574ns | 0.00813 | 0 | 0 | 576 B |
| master | StartFinishSpan |
netcoreapp3.1 | 623ns | 0.358ns | 1.34ns | 0.00779 | 0 | 0 | 576 B |
| master | StartFinishSpan |
net472 | 666ns | 0.202ns | 0.783ns | 0.0916 | 0 | 0 | 578 B |
| master | StartFinishScope |
net6.0 | 535ns | 0.185ns | 0.715ns | 0.00981 | 0 | 0 | 696 B |
| master | StartFinishScope |
netcoreapp3.1 | 737ns | 0.29ns | 1.12ns | 0.00951 | 0 | 0 | 696 B |
| master | StartFinishScope |
net472 | 795ns | 1.02ns | 3.94ns | 0.104 | 0 | 0 | 658 B |
| #5936 | StartFinishSpan |
net6.0 | 403ns | 0.976ns | 3.78ns | 0.008 | 0 | 0 | 576 B |
| #5936 | StartFinishSpan |
netcoreapp3.1 | 629ns | 0.502ns | 1.94ns | 0.00793 | 0 | 0 | 576 B |
| #5936 | StartFinishSpan |
net472 | 607ns | 0.378ns | 1.46ns | 0.0916 | 0 | 0 | 578 B |
| #5936 | StartFinishScope |
net6.0 | 486ns | 0.168ns | 0.604ns | 0.00976 | 0 | 0 | 696 B |
| #5936 | StartFinishScope |
netcoreapp3.1 | 674ns | 0.319ns | 1.24ns | 0.00943 | 0 | 0 | 696 B |
| #5936 | StartFinishScope |
net472 | 828ns | 0.563ns | 2.18ns | 0.104 | 0 | 0 | 658 B |
Benchmarks.Trace.TraceAnnotationsBenchmark - Faster 🎉 Same allocations ✔️
Faster 🎉 in #5936
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑netcoreapp3.1
1.146
978.91
854.27
| Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
|---|---|---|---|---|
| Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑netcoreapp3.1 | 1.146 | 978.91 | 854.27 |
Raw results
| Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---|---|---|---|---|---|---|---|---|---|
| master | RunOnMethodBegin |
net6.0 | 681ns | 0.43ns | 1.67ns | 0.00963 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
netcoreapp3.1 | 979ns | 0.281ns | 1.09ns | 0.00936 | 0 | 0 | 696 B |
| master | RunOnMethodBegin |
net472 | 1.09μs | 0.426ns | 1.65ns | 0.104 | 0 | 0 | 658 B |
| #5936 | RunOnMethodBegin |
net6.0 | 667ns | 0.605ns | 2.26ns | 0.00964 | 0 | 0 | 696 B |
| #5936 | RunOnMethodBegin |
netcoreapp3.1 | 854ns | 0.496ns | 1.92ns | 0.00948 | 0 | 0 | 696 B |
| #5936 | RunOnMethodBegin |
net472 | 1.14μs | 0.322ns | 1.25ns | 0.104 | 0 | 0 | 658 B |
Summary of changes
Normalize the environment variable names used by crashtracking.
DD_CRASHTRACKING_*: environment variables expected to be set by the customers. Currently:DD_CRASHTRACKING_ENABLED: enables or disables crashtracking (default: enabled)DD_INTERNAL_CRASHTRACKING_*: environment variables used by the tracer infrastructure and/or tests. Currently:DD_INTERNAL_CRASHTRACKING_PASSTHROUGH: automatically set to decide whether the real createdump should be called or notDD_INTERNAL_CRASHTRACKING_OUTPUT: save the crash report to a file instead of using telemetryReason for change
Now that other languages are implementing the feature, it's important to have consistent names.
Implementation details
DD_TRACE_CRASH_HANDLERis not needed anymore, removed it.Removed the profiler tests that relied on
DD_TRACE_CRASH_HANDLER(they're not needed now that we have crashtracking tests).Test coverage
The existing tests were updated.
Other Details
Backport of