-
Notifications
You must be signed in to change notification settings - Fork 150
[Tracer] Updating Statsd in RuntimeEventListener #7512
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
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.8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7512) - mean (72ms) : 71, 74
. : milestone, 72,
master - mean (72ms) : 71, 73
. : milestone, 72,
section Baseline
This PR (7512) - mean (69ms) : 64, 74
. : milestone, 69,
master - mean (69ms) : 65, 73
. : milestone, 69,
section CallTarget+Inlining+NGEN
This PR (7512) - mean (1,004ms) : 980, 1027
. : milestone, 1004,
master - mean (1,001ms) : 974, 1028
. : milestone, 1001,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7512) - mean (107ms) : 106, 108
. : milestone, 107,
master - mean (107ms) : 105, 109
. : milestone, 107,
section Baseline
This PR (7512) - mean (107ms) : 105, 109
. : milestone, 107,
master - mean (106ms) : 104, 108
. : milestone, 106,
section CallTarget+Inlining+NGEN
This PR (7512) - mean (707ms) : 683, 731
. : milestone, 707,
master - mean (708ms) : 690, 726
. : milestone, 708,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7512) - mean (95ms) : 93, 96
. : milestone, 95,
master - mean (94ms) : 93, 95
. : milestone, 94,
section Baseline
This PR (7512) - mean (94ms) : 92, 96
. : milestone, 94,
master - mean (94ms) : 92, 96
. : milestone, 94,
section CallTarget+Inlining+NGEN
This PR (7512) - mean (668ms) : 647, 689
. : milestone, 668,
master - mean (666ms) : 651, 681
. : milestone, 666,
gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7512) - mean (93ms) : 92, 95
. : milestone, 93,
master - mean (93ms) : 92, 94
. : milestone, 93,
section Baseline
This PR (7512) - mean (93ms) : 91, 95
. : milestone, 93,
master - mean (92ms) : 90, 94
. : milestone, 92,
section CallTarget+Inlining+NGEN
This PR (7512) - mean (593ms) : 583, 603
. : milestone, 593,
master - mean (600ms) : 588, 611
. : milestone, 600,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7512) - mean (197ms) : 194, 199
. : milestone, 197,
master - mean (196ms) : 193, 198
. : milestone, 196,
section Baseline
This PR (7512) - mean (193ms) : 188, 199
. : milestone, 193,
master - mean (193ms) : 188, 199
. : milestone, 193,
section CallTarget+Inlining+NGEN
This PR (7512) - mean (1,114ms) : 1082, 1146
. : milestone, 1114,
master - mean (1,112ms) : 1080, 1143
. : milestone, 1112,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7512) - mean (277ms) : 273, 282
. : milestone, 277,
master - mean (277ms) : 272, 282
. : milestone, 277,
section Baseline
This PR (7512) - mean (277ms) : 271, 283
. : milestone, 277,
master - mean (277ms) : 271, 283
. : milestone, 277,
section CallTarget+Inlining+NGEN
This PR (7512) - mean (898ms) : 873, 923
. : milestone, 898,
master - mean (898ms) : 864, 932
. : milestone, 898,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7512) - mean (271ms) : 266, 276
. : milestone, 271,
master - mean (271ms) : 265, 276
. : milestone, 271,
section Baseline
This PR (7512) - mean (271ms) : 265, 276
. : milestone, 271,
master - mean (269ms) : 264, 275
. : milestone, 269,
section CallTarget+Inlining+NGEN
This PR (7512) - mean (882ms) : 846, 918
. : milestone, 882,
master - mean (878ms) : 838, 918
. : milestone, 878,
gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7512) - mean (269ms) : 263, 274
. : milestone, 269,
master - mean (268ms) : 262, 273
. : milestone, 268,
section Baseline
This PR (7512) - mean (268ms) : 262, 275
. : milestone, 268,
master - mean (269ms) : 263, 274
. : milestone, 269,
section CallTarget+Inlining+NGEN
This PR (7512) - mean (789ms) : 767, 812
. : milestone, 789,
master - mean (794ms) : 771, 818
. : milestone, 794,
|
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.
Nice work 👍
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.
Thanks!
## Summary of changes Fixed runtime metrics reinitialization issue by added the option to `UpdateStatsd` to IRuntimeMetricsListener and implementing it in related classes. ## Reason for change Customer helped us noriced runtime metrics system was experiencing issues where: - Metrics were missing after upgrade - The Statsd object wasn't being properly updated during reinitialization - Runtime metrics listeners were holding onto stale Statsd references ## Implementation details - Added `UpdateStatsd` method to `IRuntimeMetricsListener.cs` interface - Modified `RuntimeEventListener.cs `and related classes to properly handle reinitialization scenarios - Updated `RuntimeMetricsWriter.cs` to use newly created _statsd_ object - Changed `_statsd` field from readonly to mutable in all runtime metrics listener implementations ## Test coverage Added test `UpdateStatsdOnReinitialization` to confirm the metrics are being sent where expected. ## Other details Fixes Jira [APMS-17172](https://datadoghq.atlassian.net/browse/APMS-17172) <!--⚠️ Note: Where possible, please obtain 2 approvals prior to merging. Unless CODEOWNERS specifies otherwise, for external teams it is typically best to have one review from a team member, and one review from apm-dotnet. Trivial changes do not require 2 reviews. MergeQueue is NOT enabled in this repository. If you have write access to the repo, the PR has 1-2 approvals (see above), and all of the required checks have passed, you can use the Squash and Merge button to merge the PR. If you don't have write access, or you need help, reach out in the #apm-dotnet channel in Slack. --> [APMS-17172]: https://datadoghq.atlassian.net/browse/APMS-17172?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
Summary of changes
Fixed runtime metrics reinitialization issue by added the option to
UpdateStatsdto IRuntimeMetricsListener and implementing it in related classes.Reason for change
Customer helped us notice runtime metrics system was experiencing issues where:
Implementation details
UpdateStatsdmethod toIRuntimeMetricsListener.csinterfaceRuntimeEventListener.csand related classes to properly handle reinitialization scenariosRuntimeMetricsWriter.csto use newly created statsd object_statsdfield from readonly to mutable in all runtime metrics listener implementationsTest coverage
Added test
UpdateStatsdOnReinitializationto confirm the metrics are being sent where expected.Other details
Fixes Jira APMS-17172