-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Fix memory pool metrics unit to follow standard #62766
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
Conversation
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.
Pull Request Overview
This PR standardizes the memory pool metrics units to follow the Unified Code for Units of Measure (UCUM) standard by changing the unit specification from "{bytes}" to "By" for all byte-related metrics.
- Updates unit specifications for four memory pool metrics to use UCUM standard notation
- Ensures consistency with standard units of measure for telemetry data
| _meter = meterFactory.Create(MeterName); | ||
|
|
||
| _currentMemory = _meter.CreateUpDownCounter<long>( | ||
| "aspnetcore.memorypool.current_memory", |
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.
Should the name be aspnetcore.memory_pool.current_memory? Memory pool is two words so should be seperated by an underscore.
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.
I'd stick to memorypool as it's a common term (even when it consists of multiple words).
Otherwise the same could apply to aspnet_core (or asp_net_core), etc.
From a usability point when searching through metrics with memory_ one can find quite a lot.
So when I'm interested in the memory pool, I'd search for memorypool as I won't remember that it's separated by underscore.
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.
We have rate_limiting rather than ratelimiting in other metrics. So an underscore here would be consistant with that.
To go with the standard, and consistency, I think memory_pool is better.
Otherwise the same could apply to aspnet_core (or asp_net_core), etc.
All product names in metrics seem to avoid underscores, e.g. cloudfoundary, elasticsearch, openai, etc.
The Unified Code for Units of Measure (UCUM) standard for bytes is
Byand should be the unit here.Edit: Also renamed counters