-
Notifications
You must be signed in to change notification settings - Fork 5k
Fix concurrency issue with metrics gauge value collection #106175
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
Fix concurrency issue with metrics gauge value collection #106175
Conversation
/azp run runtime-libraries-coreclr outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Product part looked good, I think part of the tests aren't needed and potentially we had an unintended compat break on MetricsEventSource arguments.
...es/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/LastValueAggregator.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Diagnostics.DiagnosticSource/tests/MetricEventSourceTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Diagnostics.DiagnosticSource/tests/AggregationManagerTests.cs
Outdated
Show resolved
Hide resolved
/azp run runtime-libraries-coreclr outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
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!
This PR is probably introducing some perf regression (here is one when using HttpClient in a proxy) I think we should build a dedicated web app made for tracking telemetry/metrics performance (open to suggestions). It's a very important domain and its performance can be really impactful on apps. That would allow us to estimate the cost of changes, and detect regressions in related domains. We could also run this app retroactively and see if past changes have introduced changes we may have missed. |
...ies/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/MetricsEventSource.cs
Show resolved
Hide resolved
This part of the change was fixing a regression occurred by other changes. When you have empty specs, it means you need to subscribe to all metrics in the process. This was the .NET 8.0 behavior. Recently, we have added the System.Runtime meter reporting metrics for different runtime areas GC, jit,....etc. @sebastienros how is the perf test written for the regressed part? does it listen to all meters? or just listen to the concerned meter? I expect some minor hits with the Gauge instrument as we started to synchronize the collected values but shouldn't be that much. CC @noahfalk |
There could be an issue in Crank then. I will review all the arguments we pass for this specific app (it doesn't show up in other ones) and how meters are recorded. |
Fixes #91591