process.runtime.cpu.utilization
values are between 0 and 100, should be 0 and 1
#2810
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
What happened?
The
process.runtime.cpu.utilization
system metric should have values between 0 and 1, based on the spec:(https://opentelemetry.io/docs/specs/semconv/general/metrics/#instrument-naming)
Instead the values are between 0 and 100. The values are in the correct range for
system.cpu.utilization
.Steps to Reproduce
Actual Result
Expected Result
Under
process.runtime.cpython.cpu.utilization
it should print something like[1.0]
, not[100.0]
.Additional context
This code:
opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-system-metrics/src/opentelemetry/instrumentation/system_metrics/__init__.py
Lines 726 to 734 in dda369b
should have a
/ 100
, similar to this:opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-system-metrics/src/opentelemetry/instrumentation/system_metrics/__init__.py
Lines 433 to 448 in dda369b
This is because psutil returns values in the 0-100 range.
Would you like to implement a fix?
No
The text was updated successfully, but these errors were encountered: