-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[API Proposal]: APIs to expose existing runtime EventCounter data #65989
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
CC @Maoni0 @steveharter @stephentoub @jkotas for any API feedback. |
Should this be a value on GCMemoryInfo instead? I notice we've already exposed some time/duration/percentage information there. |
@stephentoub I think @noahfalk proposed it in GC because this is already existed today there, but it is internal method. It makes sense to have it in GCMemoryInfo though. |
Should |
The internal implementation returning https://source.dot.net/#System.Private.CoreLib/src/System/Exception.CoreCLR.cs,163 |
The events that correspond to the exception and assembly counters are on AppDomain:
The user code can actually implement these counters on its own using these events today. |
chatted with @noahfalk about this. my recommendation would be that we use a much better way to show this data. the historical % time in GC counter value has always been questionable - as in, because it shows whatever the percentage that the last GC observed, it could give very false information. in .NET 7 we are already planning to add an API to show the accumulated GC pause (either an as overload of the |
I was filing this quickly to capture the request rather than doing much careful consideration of where the best API was. Don't put weight on the exact shape/location/naming I had there.
Yeah, that is reasonable (@Maoni0 gave more detail)
That makes sense to me.
👍 |
@noahfalk the GC API is already in now. |
Closing now that the GC API is in, thanks @tarekgh! |
Background and motivation
EventCounters were our original xplat metrics API and while they aren't going away, we recently added System.Diagnostics.Meter API in collaboration with OpenTelemetry and we expect it will get more use going forward. There are some counters already exposed by the RuntimeEventSource EventCounters and OpenTelemetry would like to wrap the equivalent counter data using the new API. Most of this data is available via public APIs, but a few of the data points use private APIs. We'd like to make those APIs public (or expose some other public API that has the same data):
See this issue in the OpenTelemetry repro for more context on the work.
@tarekgh
Updated Proposal
The original version of the API proposal is included below for reference but the current plan is:
This issue is staying open only to track waiting on the GC API.
Original Proposal (we are not planning to do this)
API Usage
Alternative Designs
No response
Risks
No response
The text was updated successfully, but these errors were encountered: