Skip to content

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

Merged
lmolkova merged 6 commits intoopen-telemetry:mainfrom
ChrsMark:add_k8s_cpu_metrics
Aug 11, 2024
Merged

Add k8s.{pod,node}.cpu.{time,usage} metrics#1320
lmolkova merged 6 commits intoopen-telemetry:mainfrom
ChrsMark:add_k8s_cpu_metrics

Conversation

@ChrsMark
Copy link
Copy Markdown
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
Copy Markdown
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).

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

ChrsMark commented Aug 8, 2024

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

Comment thread docs/system/k8s-metrics.md
Comment thread model/metrics/k8s.yaml Outdated
@lmolkova
Copy link
Copy Markdown
Member

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
Copy Markdown
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.

Comment thread docs/system/k8s-metrics.md Outdated
@lmolkova lmolkova enabled auto-merge (squash) August 11, 2024 01:24
@TylerHelmuth
Copy link
Copy Markdown
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
@lmolkova
Copy link
Copy Markdown
Member

@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