-
Notifications
You must be signed in to change notification settings - Fork 867
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
Add jvm cpu metrics #6107
Add jvm cpu metrics #6107
Conversation
|
||
meter | ||
.gaugeBuilder("process.runtime.jvm.system.cpu.load_1m") | ||
.setDescription("Average CPU load of the whole system for the last minute") |
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.
This definition from the semantic convention doesn't really match the the description from the OperatingSystemMXBean. It's a pretty odd calculation as it isn't bounded to the range [0,1], [0, 100] or even to [0, 100*N] where N is the number of processors.
This stack overflow post describes it as the "average is the number of waiting threads", and says the upper limit is equal to the number of threads you have.
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.
Isn't this the same as unix load average that is displayed for example by uptime
?
...ntime-metrics/library/src/main/java/io/opentelemetry/instrumentation/runtimemetrics/Cpu.java
Outdated
Show resolved
Hide resolved
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.
The casting bit to work around multiple implementations is a drag. Bummer there isn't a common interface. Otherwise, looks like a nice straightforward impl. Thanks!
Reflects the semantic conventions in #2292.