Skip to content

[k8s] Change memory.usage from gauge to updowncounter#3889

Merged
lmolkova merged 2 commits into
open-telemetry:mainfrom
ChrsMark:fix_mem_usage_instr
Jul 17, 2026
Merged

[k8s] Change memory.usage from gauge to updowncounter#3889
lmolkova merged 2 commits into
open-telemetry:mainfrom
ChrsMark:fix_mem_usage_instr

Conversation

@ChrsMark

@ChrsMark ChrsMark commented Jul 14, 2026

Copy link
Copy Markdown
Member

Changes

As highlighted at #3883 (review) this changes the instrument type to updowncounter for the following metrics:

  • container.memory.usage from counter to updowncounter
  • k8s.pod.memory.usage from gauge to updowncounter
  • k8s.node.memory.usage from gauge to updowncounter

Important

Pull request acceptance is subject to the triage process as described in Issue and PR Triage Management.
PRs that do not follow the guidance above may be automatically rejected and closed.

Merge requirement checklist

  • CONTRIBUTING.md guidelines followed.
  • Links to prototypes or existing instrumentations (when adding or changing conventions)
  • Disclose AI usage, see OTel GenAI policy:
    • no AI used
    • AI-assisted
    • bulk AI-generated
  • I have the experience and knowledge necessary to understand, review, and validate all content in this PR.1

Footnotes

  1. Yes, I can answer maintainer questions about the content of this PR without using AI.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the Kubernetes and container semantic convention metric definitions to align memory usage metrics with the intended instrument type (UpDownCounter), and propagates that change into the generated registry docs and migration guidance.

Changes:

  • Switch k8s.pod.memory.usage and k8s.node.memory.usage instrument from gauge to updowncounter in the model.
  • Switch container.memory.usage instrument to updowncounter in the model and update generated docs accordingly.
  • Add a non-normative migration note plus a changelog entry for the breaking change.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
model/k8s/metrics.yaml Changes pod/node memory usage metric instrument to updowncounter.
model/container/metrics.yaml Changes container memory usage metric instrument to updowncounter.
docs/system/k8s-metrics.md Updates generated metric table instrument types for k8s pod/node memory usage.
docs/system/container-metrics.md Updates generated metric table instrument type for container memory usage.
docs/non-normative/k8s-migration.md Adds migration guidance for the instrument-type change (with minor doc fixes needed).
.chloggen/fix_mem_usage_instr.yaml Adds breaking-change changelog entry (needs accuracy/traceability fixes).

Comment thread .chloggen/fix_mem_usage_instr.yaml Outdated
Comment thread .chloggen/fix_mem_usage_instr.yaml Outdated
Comment thread docs/non-normative/k8s-migration.md
Comment thread docs/non-normative/k8s-migration.md Outdated
Comment thread docs/non-normative/k8s-migration.md
ChrsMark added 2 commits July 16, 2026 14:55
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
@ChrsMark
ChrsMark force-pushed the fix_mem_usage_instr branch from 685512a to 70886e8 Compare July 16, 2026 11:55
@ChrsMark ChrsMark moved this to Approved by K8s SIG in K8s SemConv SIG Jul 16, 2026
@ChrsMark ChrsMark moved this from Untriaged to Needs More Approval in Semantic Conventions Triage Jul 16, 2026

@cijothomas cijothomas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@lmolkova
lmolkova enabled auto-merge July 17, 2026 18:04
@lmolkova lmolkova moved this from Needs More Approval to Ready to be Merged in Semantic Conventions Triage Jul 17, 2026
@lmolkova
lmolkova added this pull request to the merge queue Jul 17, 2026
Merged via the queue into open-telemetry:main with commit d36e740 Jul 17, 2026
18 checks passed
@github-project-automation github-project-automation Bot moved this from Approved by K8s SIG to Done in K8s SemConv SIG Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done
Archived in project

Development

Successfully merging this pull request may close these issues.

8 participants