-
Notifications
You must be signed in to change notification settings - Fork 144
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
More telemetry v2 preparation #4187
Conversation
return true; | ||
} | ||
|
||
configurationError = configurationError is null |
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.
I'm noticing it just now, but it should probably be a helper method (or declaring configurationErrors
as a list).
Unrelated to this PR though.
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.
Yeah, I agree 👍
Datadog ReportBranch report: ✅ |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
53e4821
to
4c723fb
Compare
4d38c06
to
f49cdda
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
No sense in having a separate V2 factory, and we will need to manage the lifetime of these in TelemetryFactory anyway later, so this move makes sense I think
No sense in it living in a separate class given that we need to manage the lifetime of these in TelemetryFactory anyway later, so this move makes sense I think
f49cdda
to
006155e
Compare
Benchmarks Report 🐌Benchmarks for #4187 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AppSecBodyBenchmark - 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‑netcoreapp3.1 | 1.115 | 723.20 | 648.81 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
netcoreapp3.1 | 550ns | 0.383ns | 1.48ns | 0.00718 | 0 | 0 | 544 B |
master | StartFinishSpan |
net472 | 646ns | 0.36ns | 1.35ns | 0.0867 | 0 | 0 | 546 B |
master | StartFinishScope |
netcoreapp3.1 | 723ns | 0.479ns | 1.79ns | 0.00902 | 0 | 0 | 664 B |
master | StartFinishScope |
net472 | 843ns | 0.653ns | 2.53ns | 0.0994 | 0 | 0 | 626 B |
#4187 | StartFinishSpan |
netcoreapp3.1 | 546ns | 0.809ns | 3.03ns | 0.0073 | 0 | 0 | 544 B |
#4187 | StartFinishSpan |
net472 | 648ns | 0.58ns | 2.25ns | 0.0867 | 0 | 0 | 546 B |
#4187 | StartFinishScope |
netcoreapp3.1 | 647ns | 1.27ns | 4.92ns | 0.00897 | 0 | 0 | 664 B |
#4187 | StartFinishScope |
net472 | 785ns | 0.576ns | 2.16ns | 0.0993 | 0 | 0 | 626 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 |
netcoreapp3.1 | 755ns | 0.323ns | 1.21ns | 0.00871 | 0 | 0 | 664 B |
master | RunOnMethodBegin |
net472 | 956ns | 0.749ns | 2.8ns | 0.0991 | 0 | 0 | 626 B |
#4187 | RunOnMethodBegin |
netcoreapp3.1 | 753ns | 0.323ns | 1.21ns | 0.00902 | 0 | 0 | 664 B |
#4187 | RunOnMethodBegin |
net472 | 954ns | 0.976ns | 3.65ns | 0.0992 | 0 | 0 | 626 B |
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 (4187) - mean (3,030ms) : 2935, 3124
. : milestone, 3030,
master - mean (3,049ms) : 2983, 3115
. : milestone, 3049,
section CallTarget+Inlining+NGEN
This PR (4187) - mean (3,753ms) : 3667, 3838
. : milestone, 3753,
master - mean (3,769ms) : 3678, 3860
. : milestone, 3769,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4187) - mean (3,140ms) : 2969, 3310
. : milestone, 3140,
master - mean (3,134ms) : 3017, 3251
. : milestone, 3134,
section CallTarget+Inlining+NGEN
This PR (4187) - mean (3,597ms) : 3528, 3665
. : milestone, 3597,
master - mean (3,599ms) : 3517, 3681
. : milestone, 3599,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4187) - mean (3,117ms) : 2979, 3256
. : milestone, 3117,
master - mean (3,138ms) : 2990, 3286
. : milestone, 3138,
section CallTarget+Inlining+NGEN
This PR (4187) - mean (3,574ms) : 3498, 3651
. : milestone, 3574,
master - mean (3,568ms) : 3497, 3639
. : milestone, 3568,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4187) - mean (188ms) : 184, 193
. : milestone, 188,
master - mean (187ms) : 184, 190
. : milestone, 187,
section CallTarget+Inlining+NGEN
This PR (4187) - mean (1,025ms) : 978, 1072
. : milestone, 1025,
master - mean (1,035ms) : 984, 1085
. : milestone, 1035,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4187) - mean (369ms) : 363, 375
. : milestone, 369,
section CallTarget+Inlining+NGEN
This PR (4187) - mean (1,134ms) : 1107, 1161
. : milestone, 1134,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4187) - mean (357ms) : 349, 364
. : milestone, 357,
master - mean (357ms) : 352, 362
. : milestone, 357,
section CallTarget+Inlining+NGEN
This PR (4187) - mean (1,095ms) : 1072, 1119
. : milestone, 1095,
master - mean (1,088ms) : 1062, 1114
. : milestone, 1088,
|
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 (4187) (11.444M) : 0, 11443525
master (11.553M) : 0, 11552686
benchmarks/2.30.0 (11.511M) : 0, 11511353
benchmarks/2.9.0 (11.162M) : 0, 11161538
section Automatic
This PR (4187) (8.135M) : 0, 8134909
master (8.192M) : 0, 8192371
benchmarks/2.30.0 (8.079M) : 0, 8079433
benchmarks/2.9.0 (8.099M) : 0, 8099075
section Trace stats
master (8.137M) : 0, 8137204
benchmarks/2.30.0 (8.064M) : 0, 8064379
section Manual
This PR (4187) (10.140M) : 0, 10140259
master (10.349M) : 0, 10348918
benchmarks/2.30.0 (10.301M) : 0, 10300812
section Manual + Automatic
This PR (4187) (7.868M) : 0, 7868336
master (7.764M) : 0, 7764006
benchmarks/2.30.0 (7.818M) : 0, 7817667
section Version Conflict
master (6.121M) : 0, 6120794
benchmarks/2.30.0 (6.977M) : 0, 6977174
gantt
title Throughput Linux arm64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (4187) (9.655M) : 0, 9655174
master (9.584M) : 0, 9583834
benchmarks/2.30.0 (9.717M) : 0, 9717283
benchmarks/2.9.0 (9.705M) : 0, 9704781
section Automatic
This PR (4187) (6.846M) : 0, 6845776
master (6.891M) : 0, 6890936
benchmarks/2.30.0 (6.859M) : 0, 6858691
section Trace stats
master (6.666M) : 0, 6665745
benchmarks/2.30.0 (6.632M) : 0, 6631563
section Manual
This PR (4187) (8.347M) : 0, 8346741
master (8.534M) : 0, 8534469
benchmarks/2.30.0 (8.510M) : 0, 8509554
section Manual + Automatic
This PR (4187) (6.632M) : 0, 6631639
master (6.576M) : 0, 6575762
benchmarks/2.30.0 (6.408M) : 0, 6407736
section Version Conflict
master (6.041M) : 0, 6040607
benchmarks/2.30.0 (5.944M) : 0, 5944257
gantt
title Throughput Windows x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (4187) (10.035M) : 0, 10034610
master (10.236M) : 0, 10236043
benchmarks/2.30.0 (10.769M) : 0, 10768707
benchmarks/2.9.0 (9.827M) : 0, 9827121
section Automatic
This PR (4187) (7.165M) : 0, 7164570
master (7.394M) : 0, 7393988
benchmarks/2.30.0 (7.340M) : 0, 7340012
benchmarks/2.9.0 (7.246M) : 0, 7246397
section Trace stats
master (7.325M) : 0, 7324690
benchmarks/2.30.0 (7.458M) : 0, 7457655
section Manual
This PR (4187) (9.048M) : 0, 9047700
master (9.129M) : 0, 9129334
benchmarks/2.30.0 (9.281M) : 0, 9280694
section Manual + Automatic
This PR (4187) (7.012M) : 0, 7011873
master (7.346M) : 0, 7346206
benchmarks/2.30.0 (7.373M) : 0, 7372707
section Version Conflict
master (6.325M) : 0, 6325378
benchmarks/2.30.0 (6.376M) : 0, 6375876
gantt
title Throughput Linux x64 (ASM) (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (4187) (7.552M) : 0, 7552141
master (7.600M) : 0, 7599735
benchmarks/2.30.0 (7.503M) : 0, 7502766
benchmarks/2.9.0 (7.748M) : 0, 7748029
section No attack
This PR (4187) (2.400M) : 0, 2399772
master (2.446M) : 0, 2445559
benchmarks/2.30.0 (2.439M) : 0, 2438736
benchmarks/2.9.0 (3.274M) : 0, 3273699
section Attack
This PR (4187) (2.041M) : 0, 2040908
master (2.040M) : 0, 2040135
benchmarks/2.30.0 (2.036M) : 0, 2035591
benchmarks/2.9.0 (2.598M) : 0, 2597950
section Blocking
This PR (4187) (4.039M) : 0, 4039082
master (4.173M) : 0, 4173103
benchmarks/2.30.0 (4.044M) : 0, 4044248
|
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.
LGTM
Summary of changes
A bunch of minor changes, separated into a PR for easier reviewing
Reason for change
These are all bits and pieces I need as part of the v2 telemetry work. Extracted to a separate PR to make it easier to review both.
Implementation details
We will roll out v2 gradually, so will need a setting to be able to control whether it's enabled or not. Longer term, we will delete this setting along with the v1 implementation.
Similarly, we'll roll out metrics gradually (and it requires telemetry v2)
Moved the
TelemetryFactoryV2.GetConfigInstance()
andTelemetryMetrics.Instance
calls toTelemetryFactory
for consistency (and because theTelemetryFactory
will need to manage the lifetime of these subsequently)Test coverage
Some unit tests, but none of this is in use yet
Other details
Requires merging #4180 first