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

Add k8s.{pod,node}.cpu.{time,usage} metrics #1320

Merged
merged 6 commits into from
Aug 11, 2024

Conversation

ChrsMark
Copy link
Member

@ChrsMark ChrsMark commented Aug 6, 2024

Changes

This PR adds the k8s.pod.cpu.time, k8s.pod.cpu.usage, k8s.node.cpu.time, k8s.node.cpu.usage metrics.
The respective Collector's implementation can be found at https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/kubeletstatsreceiver/metadata.yaml#L84

Part of #1032.

Merge requirement checklist

@ChrsMark ChrsMark requested review from a team August 6, 2024 08:59
@ChrsMark ChrsMark requested review from a team August 6, 2024 08:59
@ChrsMark ChrsMark force-pushed the add_k8s_cpu_metrics branch from 4354d0e to 2dc78ea Compare August 6, 2024 09:00
@ChrsMark ChrsMark force-pushed the add_k8s_cpu_metrics branch from 2dc78ea to f768c35 Compare August 6, 2024 09:03
@ChrsMark ChrsMark self-assigned this Aug 6, 2024
Copy link
Member

@TylerHelmuth TylerHelmuth left a comment

Choose a reason for hiding this comment

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

These metrics have been in place for 4+ years (except usage, whose rename from utilization is in progress).

docs/system/k8s-metrics.md Outdated Show resolved Hide resolved
Signed-off-by: ChrsMark <[email protected]>
@ChrsMark
Copy link
Member Author

ChrsMark commented Aug 8, 2024

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

model/metrics/k8s.yaml Outdated Show resolved Hide resolved
@lmolkova
Copy link
Contributor

lmolkova commented Aug 8, 2024

We probably discussed it somewhere, but could you remind me if we have cpu count available for pods/nods and if there are any plans to report it?

@ChrsMark
Copy link
Member Author

ChrsMark commented Aug 9, 2024

We probably discussed it somewhere, but could you remind me if we have cpu count available for pods/nods and if there are any plans to report it?

The k8sclusterreceiver can report the k8s.node.allocatable_cpu so at some point this would be declared in SemConv as well.

The containers define the cpu_limits/cpu_requests, so the the limits/requests of a Pod can be calculated by summarizing its containers' limits/requests.

@lmolkova lmolkova enabled auto-merge (squash) August 11, 2024 01:24
@TylerHelmuth
Copy link
Member

@lmolkova does this repo have merge queue enabled?

Co-authored-by: Liudmila Molkova <[email protected]>
@lmolkova lmolkova merged commit b2424db into open-telemetry:main Aug 11, 2024
13 checks passed
@lmolkova
Copy link
Contributor

@lmolkova does this repo have merge queue enabled?

nope, it's all manual. I enabled auto-merge for this one, but all open discussions need to be resolved to allow it to happen.

ezimuel pushed a commit to ezimuel/semantic-conventions that referenced this pull request Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants