Skip to content

add system.linux.memory.slab to system metrics#1078

Merged
joaopgrassi merged 33 commits into
open-telemetry:mainfrom
rogercoll:add_linux_memory_slab
Jul 29, 2024
Merged

add system.linux.memory.slab to system metrics#1078
joaopgrassi merged 33 commits into
open-telemetry:mainfrom
rogercoll:add_linux_memory_slab

Conversation

@rogercoll

Copy link
Copy Markdown
Contributor

Fixes #531

Related to open-telemetry/opentelemetry-collector-contrib#7417

Changes

Adds the slab memory metric that is only available on Linux systems as system.linux.memory.slab.

Merge requirement checklist

@rogercoll
rogercoll requested review from a team May 27, 2024 14:25
@rogercoll

Copy link
Copy Markdown
Contributor Author

For the attributes, it references the system.memory.state which will only match the total well-known value.
reclaimable and unreclaimable are additional custom state attributes normally associated with slab memory. For example, the current (0.101.0) version of the opentelemetry-collector-contrib uses system.memory.slab_reclaimable and system.memory.slab_unreclaimable to indicate those states.

Should this metric reference the system.memory.state attributes or create a new registry (e.g system.linux.memory.slab.state) that explicitly indicates the total, reclaimable and unreclaimable states?

@ChrsMark

ChrsMark commented May 28, 2024

Copy link
Copy Markdown
Member

Thank's @rogercoll for this PR!

Should this metric reference the system.memory.state attributes or create a new registry (e.g system.linux.memory.slab.state) that explicitly indicates the total, reclaimable and unreclaimable states?

I think it makes sense to have a specific *.state attribute which would include the reclaimable and unreclaimable.
As it was pointed out at #522 (from the usage naming convention):

Where appropriate, the sum of usage over all attribute values SHOULD be equal to the limit.

/cc @open-telemetry/semconv-system-approvers @braydonk

@mx-psi

mx-psi commented May 28, 2024

Copy link
Copy Markdown
Member

Agreed with @ChrsMark!

Comment thread docs/system/system-metrics.md Outdated
@rogercoll

Copy link
Copy Markdown
Contributor Author

I think it makes sense to have a specific *.state attribute which would include the reclaimable and unreclaimable.

Sounds good to me. To be aligned with the system.memory model, I think the following could work:

Metric name: system.linux.memory.slab.usage       
Attributes: system.linux.memory.slab.state (reclaimable and unreclaimable)
Metric name: system.linux.memory.slab.limit 

Comment thread model/metrics/system-metrics.yaml Outdated

@ChrsMark ChrsMark 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.

From SemConv perspective looks good to me.

One question: do we actually plan to implement the system.linux.memory.slab.limit as well in the Collector?

@rogercoll

Copy link
Copy Markdown
Contributor Author

One question: do we actually plan to implement the system.linux.memory.slab.limit as well in the Collector?

I would say so, the current sum of all system.memory.usage states do not equal to the limit which is needed for v1. If this PR moves forward, I can open an issue in the collector to track the implementation.

cc @dmitryax

@dmitryax dmitryax 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

Comment thread docs/system/system-metrics.md
Comment thread model/registry/system.yaml Outdated
Comment thread model/metrics/system-metrics.yaml Outdated
Comment thread model/metrics/system-metrics.yaml Outdated
Comment thread model/metrics/system-metrics.yaml Outdated
Comment thread model/metrics/system-metrics.yaml Outdated
rogercoll and others added 4 commits June 4, 2024 08:37
Co-authored-by: Liudmila Molkova <limolkova@microsoft.com>
Co-authored-by: Liudmila Molkova <limolkova@microsoft.com>
Co-authored-by: Liudmila Molkova <limolkova@microsoft.com>
Co-authored-by: Liudmila Molkova <limolkova@microsoft.com>
Comment thread docs/system/system-metrics.md
@github-actions

github-actions Bot commented Jul 5, 2024

Copy link
Copy Markdown

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions Bot added the Stale label Jul 5, 2024
@github-actions github-actions Bot removed the Stale label Jul 9, 2024

@lmolkova lmolkova 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.

Left a suggestion on attribute naming, look good otherwise!

Comment thread docs/attributes-registry/linux.md Outdated
@jsuereth
jsuereth enabled auto-merge (squash) July 18, 2024 14:48
@jsuereth
jsuereth disabled auto-merge July 18, 2024 14:48
@trisch-me

Copy link
Copy Markdown
Contributor

@rogercoll there are still some failing checks that prevent from merging

@trisch-me

Copy link
Copy Markdown
Contributor

@joaopgrassi could you check this one as you have requested changes but I think it's resolved now

@rogercoll

Copy link
Copy Markdown
Contributor Author

@rogercoll there are still some failing checks that prevent from merging

I think the failing checks are unrelated to the PR but to endpoints blocking the CI IP. Error message:

ERROR: 1 dead links found in ./docs/resource/k8s.md !
  [✖] https://www.itu.int/ITU-T/studygroups/com17/oid.html → Status: 0

I can reach the failed endpoint on my end.

Comment thread .chloggen/add_linux_memory_slab.yaml Outdated
Co-authored-by: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com>
@joaopgrassi
joaopgrassi merged commit a44ff76 into open-telemetry:main Jul 29, 2024
@rogercoll
rogercoll deleted the add_linux_memory_slab branch July 29, 2024 15:37
maryliag pushed a commit to maryliag/semantic-conventions that referenced this pull request Jul 30, 2024
Co-authored-by: Liudmila Molkova <limolkova@microsoft.com>
Co-authored-by: Alexandra Konrad <alexandra.konrad@elastic.co>
Co-authored-by: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com>
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.

Proposal to add system.memory.slab

9 participants