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

[k8s] Define semantic conventions for k8s cpu metrics #1489

Open
ChrsMark opened this issue Oct 17, 2024 · 2 comments
Open

[k8s] Define semantic conventions for k8s cpu metrics #1489

ChrsMark opened this issue Oct 17, 2024 · 2 comments
Labels
area:k8s enhancement New feature or request

Comments

@ChrsMark
Copy link
Member

ChrsMark commented Oct 17, 2024

Area(s)

area:k8s

Is your change request related to a problem? Please describe.

As part of the K8s SemConv stability work we need to define k8s cpu metrics that are already in use by the Opentelemetry Collector.

Related to #1032

Describe the solution you'd like

The existing metrics in use that we need to define as semantic conventions are the following:

k8s.node.cpu.usage:✅ #1320
k8s.node.cpu.utilization: Blocked until open-telemetry/opentelemetry-collector-contrib#27885 (comment) is covered
k8s.node.cpu.time: ✅ #1320
k8s.pod.cpu.usage: ✅ #1320
k8s.pod.cpu.utilization: Deprecated
k8s.pod.cpu.time: ✅ #1320
container.cpu.usage: ✅ #1128
container.cpu.utilization: Deprecated
container.cpu.time#282
k8s.container.cpu_limit_utilization
k8s.container.cpu_request_utilization
k8s.container.cpu.node.utilization
k8s.pod.cpu.node.utilization
k8s.pod.cpu_limit_utilization
k8s.pod.cpu_request_utilization

Describe alternatives you've considered

No response

Additional context

No response

@ChrsMark ChrsMark added enhancement New feature or request experts needed This issue or pull request is outside an area where general approvers feel they can approve triage:needs-triage labels Oct 17, 2024
@joaopgrassi joaopgrassi removed experts needed This issue or pull request is outside an area where general approvers feel they can approve triage:needs-triage labels Oct 21, 2024
@ChrsMark
Copy link
Member Author

I wonder if we could/should change *.cpu_limit_utilization to *.cpu.limit.utilization and *.cpu_request_utilization to *.cpu.request.utilization.

Along with the following (from #1032):
k8s.container.cpu_request -> k8s.container.cpu.request
k8s.container.cpu_limit -> k8s.container.cpu.limit

I know this would be a breaking change in the Collector but I want to check if we see value in doing this for consistency.
Also @lmolkova I can recall you had an issue with dots VS underscores where dots were preferred over underscores. Do I remember correctly here? Is this still valid?

@ChrsMark
Copy link
Member Author

Correcting myself after discussing this in the K8s SemConv stability SIG:

We cannot have k8s.container.cpu.request and k8s.container.cpu.request.utilization because of the constraint that metrics cannot be namespaces at the same time.

I don't have a better alternative here than what we have already defined in the Collector but if anybody has feel free to share it.

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: Todo
Development

No branches or pull requests

3 participants