Skip to content

Commit bdee2ec

Browse files
author
Mrugesh Master
committed
Divided proc_cpu_percent by 100 to get value between 0 and 1
1 parent dda369b commit bdee2ec

File tree

1 file changed

+1
-1
lines changed
  • instrumentation/opentelemetry-instrumentation-system-metrics/src/opentelemetry/instrumentation/system_metrics

1 file changed

+1
-1
lines changed

Diff for: instrumentation/opentelemetry-instrumentation-system-metrics/src/opentelemetry/instrumentation/system_metrics/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ def _get_runtime_cpu_utilization(
729729
"""Observer callback for runtime CPU utilization"""
730730
proc_cpu_percent = self._proc.cpu_percent()
731731
yield Observation(
732-
proc_cpu_percent,
732+
proc_cpu_percent / 100,
733733
self._runtime_cpu_utilization_labels.copy(),
734734
)
735735

0 commit comments

Comments
 (0)