Skip to content
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

Fix and review cpu utilization metrics #838

Closed
a-thaler opened this issue Feb 29, 2024 · 2 comments
Closed

Fix and review cpu utilization metrics #838

a-thaler opened this issue Feb 29, 2024 · 2 comments
Assignees
Labels
area/metrics MetricPipeline kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@a-thaler
Copy link
Collaborator

a-thaler commented Feb 29, 2024

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


@a-thaler a-thaler added kind/feature Categorizes issue or PR as related to a new feature. area/metrics MetricPipeline labels Feb 29, 2024
@hisarbalik
Copy link
Contributor

hisarbalik commented Mar 7, 2024

Since deprecated *.cpu.utilization metrics not used in any dashboard we skip criteria to enable deprecated metrics per annotations

@hisarbalik
Copy link
Contributor

  • Configuration capability for kubeletstatreceiver to enable or disable metrics added
  • Deprecated *.cpu.utilization disabled
  • New metrics *.cpu.usage enabled
  • Unit and e2e test are updated accordingly new configuration changes

@a-thaler a-thaler added kind/bug Categorizes issue or PR as related to a bug. and removed kind/feature Categorizes issue or PR as related to a new feature. labels Mar 8, 2024
@a-thaler a-thaler added this to the 1.11.0 milestone Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/metrics MetricPipeline kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants