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

[receiver/hostmetrics/memory] Add system.memory.usage{state=total} #27096

Closed
wants to merge 4 commits into from

Conversation

mx-psi
Copy link
Member

@mx-psi mx-psi commented Sep 25, 2023

Description:

Add system.memory.usage with state=total metric to report the total RAM memory available on the system.

After open-telemetry/semantic-conventions/pull/89 this is a valid value for system.memory.usage.

@mx-psi mx-psi changed the title [receiver/hostmetrics/memory] Add system.memory.limit [receiver/hostmetrics/memory] Add system.memory.usage{state=total} Sep 26, 2023
@mx-psi mx-psi marked this pull request as ready for review September 26, 2023 12:38
@mx-psi mx-psi requested a review from a team September 26, 2023 12:38
Copy link
Member

@songy23 songy23 left a comment

Choose a reason for hiding this comment

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

@@ -8,7 +8,7 @@ attributes:
state:
description: Breakdown of memory usage by type.
type: string
enum: [buffered, cached, inactive, free, slab_reclaimable, slab_unreclaimable, used]
enum: [total, buffered, cached, inactive, free, slab_reclaimable, slab_unreclaimable, used]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
enum: [total, buffered, cached, inactive, free, slab_reclaimable, slab_unreclaimable, used]
enum: [buffered, cached, free, inactive, slab_reclaimable, slab_unreclaimable, used, total]

This was almost in alphabetical order, we may as well sort all of it.

@crobert-1
Copy link
Member

Tests are failing https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/6312718857/job/17139373415?pr=27096

Looks like the tests are relying on the index of datapoints within the gauge, and those are now off because of the new state.

@mx-psi
Copy link
Member Author

mx-psi commented Sep 28, 2023

After discussion with the semantic conventions WG we are going to change the spec for this first to

  • prohibit total as a state value and
  • ensure the sum of all dimensions corresponds to total

@mx-psi mx-psi closed this Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants