Make "Built in Metrics for Runtime" doc accurate for memory metrics #44616
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
I was looking at https://learn.microsoft.com/en-us/dotnet/core/diagnostics/built-in-metrics-runtime and spotted a couple of things which don't seem to align with reality, so I've tried to fix them with this PR.
Firstly, the metrics
dotnet.gc.last_collection.heap.size
anddotnet.gc.collections
listdotnet.gc.heap.generation
as an attribute to mark the generation they are referring to. But when I checked the source code, the attribute is calledgc.heap.generation
. This is also what I have experienced while using this new meter.Secondly, the metric
dotnet.gc.last_collection.heap.fragmentation.size
has no attributes listed. But when I checked the source code it had an attribute similarly calledgc.heap.generation
. This has been my experience with the library as well. To address that I have copied the table from thedotnet.gc.last_collection.heap.size
metric because it is exactly the same concept.Hopefully this format of submission is okay, I'm still pretty new to open source submissions!
Internal previews