Skip to content

Add ASP.NET Core memory pool metrics#2533

Merged
trask merged 1 commit intoopen-telemetry:mainfrom
JamesNK:jamesnk/memorypool-metrics
Aug 20, 2025
Merged

Add ASP.NET Core memory pool metrics#2533
trask merged 1 commit intoopen-telemetry:mainfrom
JamesNK:jamesnk/memorypool-metrics

Conversation

@JamesNK
Copy link
Copy Markdown
Contributor

@JamesNK JamesNK commented Jul 17, 2025

Fixes #2532

Changes

Please provide a brief description of the changes here.

Note: if the PR is touching an area that is not listed in the existing areas, or the area does not have sufficient domain experts coverage, the PR might be tagged as experts needed and move slowly until experts are identified.

Merge requirement checklist

Comment thread model/aspnetcore/registry.yaml Outdated
Comment thread model/aspnetcore/metrics.yaml Outdated
Comment thread model/aspnetcore/metrics.yaml Outdated
Comment thread model/aspnetcore/metrics.yaml Outdated
Comment thread model/aspnetcore/metrics.yaml Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Aug 4, 2025

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions Bot added the Stale label Aug 4, 2025
@JamesNK JamesNK removed the Stale label Aug 4, 2025
@JamesNK JamesNK force-pushed the jamesnk/memorypool-metrics branch from af19518 to 3b13ed9 Compare August 4, 2025 04:46
@JamesNK
Copy link
Copy Markdown
Contributor Author

JamesNK commented Aug 13, 2025

All changes have been applied. Please take another look.

@lmolkova lmolkova moved this from Untriaged to Awaiting codeowners approval in Semantic Conventions Triage Aug 16, 2025
@KalleOlaviNiemitalo
Copy link
Copy Markdown

Is there an invariant:

aspnetcore.memory_pool.pooled = aspnetcore.memory_pool.allocated - aspnetcore.memory_pool.rented - aspnetcore.memory_pool.evicted

@JamesNK
Copy link
Copy Markdown
Contributor Author

JamesNK commented Aug 17, 2025

No, because rented is total. Memory could be returned and rented many times.

Allocated: 50 bytes
Rented: 500 bytes
Evicted: 0 bytes

Pooled does not equal -450 bytes.

One interesting piece of data is how much an application has currently leased. You can calculate the currently leased memory with this:

leased = allocated - pooled - evicted

@JamesNK JamesNK force-pushed the jamesnk/memorypool-metrics branch from 3b13ed9 to 86a6839 Compare August 20, 2025 00:47
@JamesNK
Copy link
Copy Markdown
Contributor Author

JamesNK commented Aug 20, 2025

@trask I resolved conflicts created by merging #2508.

This PR is ready to merge.

@github-project-automation github-project-automation Bot moved this from Awaiting codeowners approval to Needs More Approval in Semantic Conventions Triage Aug 20, 2025
@lmolkova lmolkova moved this from Needs More Approval to Ready to be Merged in Semantic Conventions Triage Aug 20, 2025
@trask trask added this pull request to the merge queue Aug 20, 2025
Merged via the queue into open-telemetry:main with commit f253d58 Aug 20, 2025
15 checks passed
ShipraJain01 pushed a commit to ShipraJain01/semantic-conventions that referenced this pull request Aug 29, 2025
@julealgon
Copy link
Copy Markdown

@JamesNK
Copy link
Copy Markdown
Contributor Author

JamesNK commented Nov 28, 2025

Never got around to it. AI could probably copy it across quickly

@julealgon
Copy link
Copy Markdown

Never got around to it. AI could probably copy it across quickly

Thanks for clarifying. I was wondering if there was a chance this was actually not pushed as part of .NET 10 and that was maybe why. Good to hear that's not the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:aspnetcore enhancement New feature or request

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Add ASP.NET Core memory pool metrics

6 participants