Closed alexmojaki closed 1 month ago
I would like to work on this issue
Hey @lzchen ,
I also want to give it a try to work on this issue. Can you please assign me this issue? Please don't hesitate to give me any suggestions or guidance as I work on this task. I'm open to feedback and would appreciate any insights you have.
Thank you!
@rissh
I believe @mrugeshmaster commented first to want to work on this issue. You can reach out to them if you want to collaborate or wait for a PR from them so you can review.
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:
https://github.com/open-telemetry/opentelemetry-python-contrib/blob/dda369b7247919b8d4351b6a2535c7ad9e7f0fc0/instrumentation/opentelemetry-instrumentation-system-metrics/src/opentelemetry/instrumentation/system_metrics/__init__.py#L726-L734
should have a
/ 100
, similar to this:https://github.com/open-telemetry/opentelemetry-python-contrib/blob/dda369b7247919b8d4351b6a2535c7ad9e7f0fc0/instrumentation/opentelemetry-instrumentation-system-metrics/src/opentelemetry/instrumentation/system_metrics/__init__.py#L433-L448
This is because psutil returns values in the 0-100 range.
Would you like to implement a fix?
No