Skip to content

(k8s): add CPU limit/request utilization metrics for pod and container#2514

Merged
joaopgrassi merged 5 commits intoopen-telemetry:mainfrom
ChrsMark:semconv_k8s_cpu_utilization
Sep 11, 2025
Merged

(k8s): add CPU limit/request utilization metrics for pod and container#2514
joaopgrassi merged 5 commits intoopen-telemetry:mainfrom
ChrsMark:semconv_k8s_cpu_utilization

Conversation

@ChrsMark
Copy link
Copy Markdown
Member

@ChrsMark ChrsMark commented Jul 13, 2025

Part of #1489 and #1032

Changes

This PR adds the following metrics:

  • k8s.container.cpu.limit_utilization
  • k8s.container.cpu.request_utilization

These metrics are already in use by the Collector: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.129.0/receiver/kubeletstatsreceiver/documentation.md

Merge requirement checklist

@ChrsMark ChrsMark requested review from a team as code owners July 13, 2025 12:37
@github-actions github-actions Bot added enhancement New feature or request area:k8s labels Jul 13, 2025
@lmolkova lmolkova moved this from Untriaged to Awaiting codeowners approval in Semantic Conventions Triage Jul 29, 2025
@ChrsMark ChrsMark moved this to In Review in K8s SemConv SIG Sep 1, 2025
@ChrsMark ChrsMark self-assigned this Sep 2, 2025
@ChrsMark ChrsMark force-pushed the semconv_k8s_cpu_utilization branch 2 times, most recently from 5ca2f00 to b1d11bc Compare September 2, 2025 08:32
@ChrsMark ChrsMark force-pushed the semconv_k8s_cpu_utilization branch from b1d11bc to e18ea5b Compare September 2, 2025 09:14
@ChrsMark
Copy link
Copy Markdown
Member Author

ChrsMark commented Sep 2, 2025

@open-telemetry/semconv-k8s-approvers please take a look

Signed-off-by: ChrsMark <[email protected]>
@ChrsMark
Copy link
Copy Markdown
Member Author

ChrsMark commented Sep 4, 2025

@jinja2 @skl @dmitryax I have removed the pod related metric for now until we have the discussion on how/if these will be implemented. I filed an issue in the Collector contrib so we can revisit the current implementation first: open-telemetry/opentelemetry-collector-contrib#42485

Apart from this, the current PR is ready for review so please take a look.

Copy link
Copy Markdown
Member

@skl skl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, just one comment!

Comment thread model/k8s/metrics.yaml Outdated
Comment thread model/k8s/metrics.yaml Outdated
ChrsMark and others added 2 commits September 9, 2025 09:30
Signed-off-by: ChrsMark <[email protected]>
@ChrsMark ChrsMark requested a review from jinja2 September 9, 2025 06:32
@ChrsMark ChrsMark moved this from In Review to Approved by K8s SIG in K8s SemConv SIG Sep 10, 2025
@ChrsMark ChrsMark moved this from Awaiting codeowners approval to Needs More Approval in Semantic Conventions Triage Sep 10, 2025
@ChrsMark
Copy link
Copy Markdown
Member Author

@open-telemetry/specs-semconv-approvers @open-telemetry/specs-semconv-maintainers could you please take a look?

@ChrsMark ChrsMark moved this from Needs More Approval to Ready to be Merged in Semantic Conventions Triage Sep 11, 2025
@github-project-automation github-project-automation Bot moved this from Ready to be Merged to Needs More Approval in Semantic Conventions Triage Sep 11, 2025
@joaopgrassi joaopgrassi added this pull request to the merge queue Sep 11, 2025
Merged via the queue into open-telemetry:main with commit 585c4c3 Sep 11, 2025
28 of 29 checks passed
@github-project-automation github-project-automation Bot moved this from Approved by K8s SIG to Done in K8s SemConv SIG Sep 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:k8s enhancement New feature or request

Projects

Status: Done
Archived in project

Development

Successfully merging this pull request may close these issues.

8 participants