Skip to content

Fix and review cpu utilization metrics #838

Closed
@a-thaler

Description

@a-thaler

Description

It turns out that the utilization metrics currently exposed by the kubeletstatsreceiver are calculated wrong and with that also are wrongly named, see open-telemetry/opentelemetry-collector-contrib#27885

With open-telemetry/opentelemetry-collector-contrib#25901 a new metric is available having the proper name and calculation. The new metric is still disabled by default and the old metric enabled, but the old metrics have already a deprecation warning:

{"level":"warn","ts":1709053389.6699765,"caller":"metadata/generated_metrics.go:2894","msg":"[WARNING] `container.cpu.utilization` should not be enabled: WARNING: This metric will be disabled in a future release. Use metric container.cpu.usage instead.","kind":"receiver","name":"kubeletstats","data_type":"metrics"}
{"level":"warn","ts":1709053389.6699817,"caller":"metadata/generated_metrics.go:2897","msg":"[WARNING] `k8s.node.cpu.utilization` should not be enabled: WARNING: This metric will be disabled in a future release. Use metric k8s.node.cpu.usage instead.","kind":"receiver","name":"kubeletstats","data_type":"metrics"}
{"level":"warn","ts":1709053389.6699867,"caller":"metadata/generated_metrics.go:2900","msg":"[WARNING] `k8s.pod.cpu.utilization` should not be enabled: This metric will be disabled in a future release. Use metric k8s.pod.cpu.usage instead.","kind":"receiver","name":"kubeletstats","data_type":"metrics"}

Goal

Criterias

  • The new metrics are enabled and used in the Cloud Logging dashboards
  • The old metrics are disabled by default
  • If a specific annotation is present on the module CR, the old metric will stay enabled (additionally to the new metric). If people migrated, they can just delete the annotation.

open-telemetry/opentelemetry-collector-contrib#27885

Reasons

Attachments

Release Notes


Metadata

Metadata

Assignees

Labels

area/metricsMetricPipelinekind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions