Skip to content

Conversation

ChrsMark
Copy link
Member

@ChrsMark ChrsMark commented Sep 15, 2025

Fixes #1490.
Part of #1032.

Changes

This PR adds the following metrics that are already in use by the Collector at https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.135.0/receiver/kubeletstatsreceiver/documentation.md.

The metrics are the following:

  • k8s.node.memory.available
  • k8s.node.memory.rss
  • k8s.node.memory.working_set
  • k8s.node.memory.page_faults renamed to k8s.node.memory.paging.faults with attribute system.paging.type set to minor
  • k8s.node.memory.major_page_faults renamed to k8s.node.memory.paging.faults with attribute system.paging.type set to major
  • k8s.pod.memory.available
  • k8s.pod.memory.rss
  • k8s.pod.memory.working_set
  • k8s.pod.memory.page_faults renamed to k8s.pod.memory.paging.faults with attribute system.paging.type set to minor
  • k8s.pod.memory.major_page_faults renamed to k8s.pod.memory.paging.faults with attribute system.paging.type set to major
  • container.memory.available
  • container.memory.rss
  • container.memory.working_set
  • container.memory.page_faults renamed to container.memory.paging.faults with attribute system.paging.type set to minor
  • container.memory.major_page_faults renamed to container.memory.paging.faults with attribute system.paging.type set to major

k8s.node.memory.* and k8s.pod.memory.* metrics are in alignment with what https://pkg.go.dev/k8s.io/[email protected]/pkg/apis/stats/v1alpha1 (this api is used in the Collector implementation).

container.memory.* metrics are in alignment with what cadvisor provides.

refs:

Merge requirement checklist

  • CONTRIBUTING.md guidelines followed.
  • Change log entry added, according to the guidelines in When to add a changelog entry.
    • If your PR does not need a change log, start the PR title with [chore]
  • Links to the prototypes or existing instrumentations (when adding or changing conventions)

@ChrsMark ChrsMark self-assigned this Sep 15, 2025
@ChrsMark ChrsMark requested review from a team as code owners September 15, 2025 12:21
@github-actions github-actions bot added enhancement New feature or request area:k8s labels Sep 15, 2025
@ChrsMark ChrsMark force-pushed the add_k8s_memory_metrics branch 2 times, most recently from 6abebd8 to 07f3ff7 Compare September 15, 2025 12:30
@ChrsMark ChrsMark moved this to In Review in K8s SemConv SIG Sep 15, 2025
@ChrsMark ChrsMark moved this from Untriaged to Awaiting codeowners approval in Semantic Conventions Triage Sep 15, 2025
@ChrsMark ChrsMark force-pushed the add_k8s_memory_metrics branch from 07f3ff7 to 4b6d510 Compare September 16, 2025 07:43
@ChrsMark ChrsMark requested a review from dashpole September 17, 2025 07:14
@ChrsMark ChrsMark moved this from In Review to Approved by K8s SIG in K8s SemConv SIG Sep 25, 2025
@ChrsMark ChrsMark moved this from Awaiting codeowners approval to Needs More Approval in Semantic Conventions Triage Sep 25, 2025
@ChrsMark
Copy link
Member Author

@open-telemetry/specs-semconv-maintainers this one is approved by the K8s SIG, please take a look when you get the chance

Signed-off-by: ChrsMark <[email protected]>
@trask trask moved this from Needs More Approval to Ready to be Merged in Semantic Conventions Triage Oct 2, 2025
@joaopgrassi joaopgrassi added this pull request to the merge queue Oct 3, 2025
Merged via the queue into open-telemetry:main with commit 5075ca7 Oct 3, 2025
17 checks passed
@github-project-automation github-project-automation bot moved this from Approved by K8s SIG to Done in K8s SemConv SIG Oct 3, 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.

[k8s] Define semantic conventions for k8s memory metrics
6 participants