-
Notifications
You must be signed in to change notification settings - Fork 140
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
Config refactor - Add telemetry to otel config (#5717 -> v2) #5864
Config refactor - Add telemetry to otel config (#5717 -> v2) #5864
Conversation
Records logs and metrics for when otel config is overriden by datadog config, or when it's invalid This was originally part of #5661, but wasn't possible due to concerns with the fact `ConfigurationBuilder` is used in critical "startup" paths for the tracer, so can result in recursion if we're not careful. The crux of the implementation is that we "store" error and metrics for writing at the point we know it's safe. This is _similar_ to what we already do for configuration telemetry. (Technically I think we _Could_ directly access the `TelemetryFactory.Metrics`, but this is "safer", and makes it easier to test we're sending the right metrics Added unit tests to all of the existing settings tests where we override configuration to confirm that it works as expected The metrics etc are all ported from #5661, but there are currently some issues with the proposed values: - [x] The metrics aren't added to the intake yet, so need updating there (and copying here) - [x] The tag names aren't "valid" for standard telemetry metrics, they should be lowercase, and shouldn't use `.`. I would suggest changing these to be lowercase and replacing `.` with `_`, but either way this should happen after they've been OK'd in the intake. Part of a big ole stack: - #5713 - #5714 - #5715 - #5716 - #5717 (this PR)
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 (5864) - mean (73ms) : 60, 86
. : milestone, 73,
master - mean (73ms) : 63, 83
. : milestone, 73,
section CallTarget+Inlining+NGEN
This PR (5864) - mean (1,027ms) : 1007, 1047
. : milestone, 1027,
master - mean (1,069ms) : 1045, 1092
. : milestone, 1069,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5864) - mean (110ms) : 106, 113
. : milestone, 110,
master - mean (109ms) : 104, 114
. : milestone, 109,
section CallTarget+Inlining+NGEN
This PR (5864) - mean (718ms) : 688, 747
. : milestone, 718,
master - mean (750ms) : 727, 773
. : milestone, 750,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5864) - mean (92ms) : 89, 95
. : milestone, 92,
master - mean (93ms) : 89, 97
. : milestone, 93,
section CallTarget+Inlining+NGEN
This PR (5864) - mean (672ms) : 649, 696
. : milestone, 672,
master - mean (703ms) : 683, 723
. : milestone, 703,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5864) - mean (192ms) : 189, 196
. : milestone, 192,
master - mean (192ms) : 188, 196
. : milestone, 192,
section CallTarget+Inlining+NGEN
This PR (5864) - mean (1,127ms) : 1107, 1148
. : milestone, 1127,
master - mean (1,166ms) : 1139, 1193
. : milestone, 1166,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5864) - mean (278ms) : 273, 283
. : milestone, 278,
master - mean (277ms) : 271, 283
. : milestone, 277,
section CallTarget+Inlining+NGEN
This PR (5864) - mean (885ms) : 858, 912
. : milestone, 885,
master - mean (918ms) : 897, 938
. : milestone, 918,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5864) - mean (267ms) : 262, 272
. : milestone, 267,
master - mean (267ms) : 263, 270
. : milestone, 267,
section CallTarget+Inlining+NGEN
This PR (5864) - mean (873ms) : 852, 894
. : milestone, 873,
master - mean (904ms) : 879, 929
. : milestone, 904,
|
Datadog ReportBranch report: ✅ 0 Failed, 348246 Passed, 1774 Skipped, 15h 13m 54.1s Total Time ⌛ Performance Regressions vs Default Branch (15)
|
Benchmarks Report for appsec 🐌Benchmarks for #5864 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.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.Iast.StringAspectsBenchmark - Faster 🎉 More allocations
|
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 | 1.173 | 61,300.00 | 52,250.00 | bimodal |
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 253.98 KB | 262.44 KB | 8.46 KB | 3.33% |
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 | 59.01 KB | 60.56 KB | 1.55 KB | 2.63% |
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 265.14 KB | 255.39 KB | -9.74 KB | -3.68% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StringConcatBenchmark |
net6.0 | 60.6μs | 653ns | 6.53μs | 0 | 0 | 0 | 43.44 KB |
master | StringConcatBenchmark |
netcoreapp3.1 | 62.1μs | 871ns | 8.53μs | 0 | 0 | 0 | 42.64 KB |
master | StringConcatBenchmark |
net472 | 38.7μs | 186ns | 769ns | 0 | 0 | 0 | 59.01 KB |
master | StringConcatAspectBenchmark |
net6.0 | 313μs | 1.65μs | 10.7μs | 0 | 0 | 0 | 265.14 KB |
master | StringConcatAspectBenchmark |
netcoreapp3.1 | 347μs | 1.95μs | 13.1μs | 0 | 0 | 0 | 253.98 KB |
master | StringConcatAspectBenchmark |
net472 | 291μs | 7.42μs | 72.7μs | 0 | 0 | 0 | 278.53 KB |
#5864 | StringConcatBenchmark |
net6.0 | 52.3μs | 206ns | 825ns | 0 | 0 | 0 | 43.44 KB |
#5864 | StringConcatBenchmark |
netcoreapp3.1 | 60.5μs | 831ns | 8.1μs | 0 | 0 | 0 | 42.64 KB |
#5864 | StringConcatBenchmark |
net472 | 38μs | 139ns | 519ns | 0 | 0 | 0 | 60.56 KB |
#5864 | StringConcatAspectBenchmark |
net6.0 | 286μs | 5.67μs | 56.1μs | 0 | 0 | 0 | 255.39 KB |
#5864 | StringConcatAspectBenchmark |
netcoreapp3.1 | 341μs | 1.61μs | 6.01μs | 0 | 0 | 0 | 262.44 KB |
#5864 | StringConcatAspectBenchmark |
net472 | 295μs | 7.86μs | 76.6μs | 0 | 0 | 0 | 278.53 KB |
Benchmarks Report for tracer 🐌Benchmarks for #5864 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.67 KB | 41.42 KB | -247 B | -0.59% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | WriteAndFlushEnrichedTraces |
net6.0 | 565μs | 2.68μs | 11.1μs | 0.571 | 0 | 0 | 41.67 KB |
master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 690μs | 3.69μs | 20.2μs | 0.327 | 0 | 0 | 41.79 KB |
master | WriteAndFlushEnrichedTraces |
net472 | 878μs | 3.88μs | 14.5μs | 8.13 | 2.57 | 0.428 | 53.32 KB |
#5864 | WriteAndFlushEnrichedTraces |
net6.0 | 560μs | 2.76μs | 12μs | 0.561 | 0 | 0 | 41.42 KB |
#5864 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 733μs | 4.93μs | 48.3μs | 0.338 | 0 | 0 | 41.76 KB |
#5864 | WriteAndFlushEnrichedTraces |
net472 | 879μs | 2.71μs | 10.1μs | 8.08 | 2.55 | 0.425 | 53.3 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.2μs | 1.17ns | 4.54ns | 0.0144 | 0 | 0 | 1.02 KB |
master | ExecuteNonQuery |
netcoreapp3.1 | 1.68μs | 1.56ns | 6.04ns | 0.0136 | 0 | 0 | 1.02 KB |
master | ExecuteNonQuery |
net472 | 2.01μs | 3.46ns | 13.4ns | 0.157 | 0 | 0 | 987 B |
#5864 | ExecuteNonQuery |
net6.0 | 1.23μs | 0.857ns | 3.32ns | 0.0142 | 0 | 0 | 1.02 KB |
#5864 | ExecuteNonQuery |
netcoreapp3.1 | 1.75μs | 2.27ns | 8.79ns | 0.0139 | 0 | 0 | 1.02 KB |
#5864 | ExecuteNonQuery |
net472 | 1.99μs | 2.41ns | 8.69ns | 0.156 | 0 | 0 | 987 B |
Benchmarks.Trace.ElasticsearchBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #5864
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0
1.133
1,197.78
1,357.35
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0 | 1.133 | 1,197.78 | 1,357.35 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | CallElasticsearch |
net6.0 | 1.2μs | 0.56ns | 2.02ns | 0.0138 | 0 | 0 | 976 B |
master | CallElasticsearch |
netcoreapp3.1 | 1.6μs | 0.879ns | 3.29ns | 0.0128 | 0 | 0 | 976 B |
master | CallElasticsearch |
net472 | 2.6μs | 1.22ns | 4.71ns | 0.158 | 0 | 0 | 995 B |
master | CallElasticsearchAsync |
net6.0 | 1.29μs | 0.553ns | 2.14ns | 0.0129 | 0 | 0 | 952 B |
master | CallElasticsearchAsync |
netcoreapp3.1 | 1.69μs | 0.763ns | 2.86ns | 0.0135 | 0 | 0 | 1.02 KB |
master | CallElasticsearchAsync |
net472 | 2.61μs | 1.94ns | 7.5ns | 0.167 | 0 | 0 | 1.05 KB |
#5864 | CallElasticsearch |
net6.0 | 1.36μs | 1.21ns | 4.7ns | 0.0137 | 0 | 0 | 976 B |
#5864 | CallElasticsearch |
netcoreapp3.1 | 1.53μs | 0.643ns | 2.4ns | 0.013 | 0 | 0 | 976 B |
#5864 | CallElasticsearch |
net472 | 2.53μs | 0.803ns | 2.9ns | 0.158 | 0 | 0 | 995 B |
#5864 | CallElasticsearchAsync |
net6.0 | 1.27μs | 0.584ns | 2.26ns | 0.013 | 0 | 0 | 952 B |
#5864 | CallElasticsearchAsync |
netcoreapp3.1 | 1.69μs | 0.687ns | 2.57ns | 0.0135 | 0 | 0 | 1.02 KB |
#5864 | CallElasticsearchAsync |
net472 | 2.59μs | 1.51ns | 5.85ns | 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.25μs | 1.24ns | 4.65ns | 0.0133 | 0 | 0 | 952 B |
master | ExecuteAsync |
netcoreapp3.1 | 1.62μs | 1.12ns | 4.21ns | 0.0124 | 0 | 0 | 952 B |
master | ExecuteAsync |
net472 | 1.65μs | 1.22ns | 4.72ns | 0.145 | 0 | 0 | 915 B |
#5864 | ExecuteAsync |
net6.0 | 1.23μs | 0.983ns | 3.68ns | 0.0131 | 0 | 0 | 952 B |
#5864 | ExecuteAsync |
netcoreapp3.1 | 1.55μs | 0.853ns | 3.3ns | 0.0124 | 0 | 0 | 952 B |
#5864 | ExecuteAsync |
net472 | 1.81μs | 0.349ns | 1.31ns | 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.03μs | 2.24ns | 8.37ns | 0.0321 | 0 | 0 | 2.22 KB |
master | SendAsync |
netcoreapp3.1 | 5.07μs | 2.28ns | 8.84ns | 0.0356 | 0 | 0 | 2.76 KB |
master | SendAsync |
net472 | 7.74μs | 2.23ns | 8.36ns | 0.499 | 0 | 0 | 3.15 KB |
#5864 | SendAsync |
net6.0 | 4.08μs | 1.77ns | 6.61ns | 0.0305 | 0 | 0 | 2.22 KB |
#5864 | SendAsync |
netcoreapp3.1 | 5.12μs | 2.08ns | 7.51ns | 0.036 | 0 | 0 | 2.76 KB |
#5864 | SendAsync |
net472 | 7.82μs | 4.27ns | 16.5ns | 0.497 | 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.6μs | 0.943ns | 3.53ns | 0.0232 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
netcoreapp3.1 | 2.21μs | 1.28ns | 4.78ns | 0.0211 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
net472 | 2.67μs | 5.61ns | 21.7ns | 0.249 | 0 | 0 | 1.57 KB |
#5864 | EnrichedLog |
net6.0 | 1.5μs | 6.4ns | 24.8ns | 0.0226 | 0 | 0 | 1.64 KB |
#5864 | EnrichedLog |
netcoreapp3.1 | 2.31μs | 1.01ns | 3.92ns | 0.022 | 0 | 0 | 1.64 KB |
#5864 | EnrichedLog |
net472 | 2.53μs | 1.01ns | 3.92ns | 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 | 116μs | 202ns | 782ns | 0.0581 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
netcoreapp3.1 | 120μs | 216ns | 836ns | 0.0606 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
net472 | 150μs | 147ns | 569ns | 0.662 | 0.221 | 0 | 4.46 KB |
#5864 | EnrichedLog |
net6.0 | 116μs | 227ns | 819ns | 0.0573 | 0 | 0 | 4.28 KB |
#5864 | EnrichedLog |
netcoreapp3.1 | 120μs | 142ns | 551ns | 0 | 0 | 0 | 4.28 KB |
#5864 | EnrichedLog |
net472 | 149μs | 394ns | 1.53μs | 0.671 | 0.224 | 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.08μs | 0.97ns | 3.76ns | 0.0308 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
netcoreapp3.1 | 4.17μs | 1.42ns | 5.48ns | 0.0294 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
net472 | 4.81μs | 1.12ns | 4.19ns | 0.319 | 0 | 0 | 2.02 KB |
#5864 | EnrichedLog |
net6.0 | 3.1μs | 1.16ns | 4.49ns | 0.031 | 0 | 0 | 2.2 KB |
#5864 | EnrichedLog |
netcoreapp3.1 | 4.23μs | 2.14ns | 8.29ns | 0.0297 | 0 | 0 | 2.2 KB |
#5864 | EnrichedLog |
net472 | 4.84μs | 1.63ns | 6.32ns | 0.321 | 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.37μs | 0.688ns | 2.57ns | 0.0164 | 0 | 0 | 1.14 KB |
master | SendReceive |
netcoreapp3.1 | 1.74μs | 1.15ns | 4.46ns | 0.0157 | 0 | 0 | 1.14 KB |
master | SendReceive |
net472 | 2.08μs | 0.837ns | 3.24ns | 0.183 | 0.00104 | 0 | 1.16 KB |
#5864 | SendReceive |
net6.0 | 1.34μs | 0.606ns | 2.1ns | 0.0161 | 0 | 0 | 1.14 KB |
#5864 | SendReceive |
netcoreapp3.1 | 1.76μs | 1.17ns | 4.52ns | 0.0159 | 0 | 0 | 1.14 KB |
#5864 | SendReceive |
net472 | 2.16μs | 0.992ns | 3.84ns | 0.183 | 0.00107 | 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.99μs | 3.19ns | 12ns | 0.0223 | 0 | 0 | 1.6 KB |
master | EnrichedLog |
netcoreapp3.1 | 3.83μs | 2.2ns | 8.53ns | 0.0211 | 0 | 0 | 1.65 KB |
master | EnrichedLog |
net472 | 4.41μs | 1.44ns | 5.37ns | 0.322 | 0 | 0 | 2.04 KB |
#5864 | EnrichedLog |
net6.0 | 2.8μs | 0.941ns | 3.64ns | 0.0211 | 0 | 0 | 1.6 KB |
#5864 | EnrichedLog |
netcoreapp3.1 | 3.87μs | 1.25ns | 4.85ns | 0.0211 | 0 | 0 | 1.65 KB |
#5864 | EnrichedLog |
net472 | 4.39μs | 3.32ns | 12.9ns | 0.323 | 0 | 0 | 2.04 KB |
Benchmarks.Trace.SpanBenchmark - Faster 🎉 Same allocations ✔️
Faster 🎉 in #5864
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0
1.186
564.93
476.49
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 | 1.186 | 564.93 | 476.49 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 395ns | 0.154ns | 0.577ns | 0.00816 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 555ns | 0.482ns | 1.87ns | 0.00776 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 629ns | 0.207ns | 0.802ns | 0.0916 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 565ns | 0.341ns | 1.28ns | 0.00984 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 751ns | 0.348ns | 1.35ns | 0.00943 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 814ns | 0.428ns | 1.66ns | 0.104 | 0 | 0 | 658 B |
#5864 | StartFinishSpan |
net6.0 | 397ns | 0.189ns | 0.708ns | 0.00801 | 0 | 0 | 576 B |
#5864 | StartFinishSpan |
netcoreapp3.1 | 582ns | 0.601ns | 2.33ns | 0.00762 | 0 | 0 | 576 B |
#5864 | StartFinishSpan |
net472 | 613ns | 0.148ns | 0.554ns | 0.0915 | 0 | 0 | 578 B |
#5864 | StartFinishScope |
net6.0 | 476ns | 0.181ns | 0.701ns | 0.00977 | 0 | 0 | 696 B |
#5864 | StartFinishScope |
netcoreapp3.1 | 788ns | 0.449ns | 1.74ns | 0.00947 | 0 | 0 | 696 B |
#5864 | StartFinishScope |
net472 | 848ns | 1.34ns | 5.2ns | 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 | 656ns | 0.483ns | 1.87ns | 0.00987 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 887ns | 0.42ns | 1.57ns | 0.00931 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.15μs | 0.328ns | 1.27ns | 0.104 | 0 | 0 | 658 B |
#5864 | RunOnMethodBegin |
net6.0 | 686ns | 0.366ns | 1.42ns | 0.00964 | 0 | 0 | 696 B |
#5864 | RunOnMethodBegin |
netcoreapp3.1 | 891ns | 0.954ns | 3.57ns | 0.00946 | 0 | 0 | 696 B |
#5864 | RunOnMethodBegin |
net472 | 1.09μs | 0.254ns | 0.952ns | 0.104 | 0 | 0 | 658 B |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Summary of changes
Records logs and metrics for when otel config is overriden by datadog config, or when it's invalid
Reason for change
This was originally part of #5661, but wasn't possible due to concerns with the fact
ConfigurationBuilder
is used in critical "startup" paths for the tracer, so can result in recursion if we're not careful.Implementation details
The crux of the implementation is that we "store" error and metrics for writing at the point we know it's safe. This is similar to what we already do for configuration telemetry.
(Technically I think we Could directly access the
TelemetryFactory.Metrics
, but this is "safer", and makes it easier to test we're sending the right metricsTest coverage
Added unit tests to all of the existing settings tests where we override configuration to confirm that it works as expected
Other details
The metrics etc are all ported from #5661, but there are currently some issues with the proposed values:
.
. I would suggest changing these to be lowercase and replacing.
with_
, but either way this should happen after they've been OK'd in the intake.Original PR: