Skip to content

Conversation

jwreford99
Copy link
Contributor

@jwreford99 jwreford99 commented Jan 30, 2025

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 and dotnet.gc.collections list dotnet.gc.heap.generation as an attribute to mark the generation they are referring to. But when I checked the source code, the attribute is called gc.heap.generation. This is also what I have experienced while using this new meter.

Secondly, the metricdotnet.gc.last_collection.heap.fragmentation.size has no attributes listed. But when I checked the source code it had an attribute similarly called gc.heap.generation. This has been my experience with the library as well. To address that I have copied the table from the dotnet.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

📄 File 🔗 Preview link
docs/core/diagnostics/built-in-metrics-runtime.md .NET Runtime metrics

@jwreford99 jwreford99 requested review from tommcdon and a team as code owners January 30, 2025 11:31
@dotnetrepoman dotnetrepoman bot added this to the January 2025 milestone Jan 30, 2025
@dotnet-policy-service dotnet-policy-service bot added dotnet-fundamentals/svc community-contribution Indicates PR is created by someone from the .NET community. labels Jan 30, 2025
@jwreford99 jwreford99 changed the title Make Built in Metrics for runtime doc accurate for memory metrics Make "Built in Metrics for Runtime" doc accurate for memory metrics Jan 30, 2025
@jwreford99
Copy link
Contributor Author

@tommcdon is there anything I can do to help get this merged? Sorry, am pretty new to this process so not sure if I need to do anymore steps to make your life easier! TIA 😄

Copy link
Contributor

@gewarren gewarren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. @noahfalk can you take a look?

Copy link
Member

@noahfalk noahfalk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jwreford99 - Thanks so much for taking the time to correct the docs!

This looks good to me assuming you merge in @gewarren's formatting suggestions.

@gewarren gewarren merged commit 46c474b into dotnet:main Feb 18, 2025
8 checks passed
@jwreford99
Copy link
Contributor Author

Thanks for the reviews and for sorting the formatting suggestions! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-contribution Indicates PR is created by someone from the .NET community. dotnet-fundamentals/svc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants