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

Merge *.cpu.state attributes to a common cpu.state attribute #1026

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ChrsMark
Copy link
Member

@ChrsMark ChrsMark commented May 10, 2024

Fixes #840

Changes

This PR introduces a common cpu.state attribute which is a converged attribute from the system.cpu.state, process.cpu.state and container.cpu.state.

Merge requirement checklist

@ChrsMark ChrsMark requested review from a team as code owners May 10, 2024 10:07
@ChrsMark ChrsMark self-assigned this May 10, 2024
@ChrsMark ChrsMark requested a review from a team as a code owner May 10, 2024 10:21
@ChrsMark ChrsMark force-pushed the merge_cpu_states branch 2 times, most recently from de27ecd to dbd49a4 Compare May 10, 2024 13:13
members:
- id: user
value: 'user'
brief: "When tasks of the cgroup are in user mode (Linux). When all container processes are in user mode (Windows)."
Copy link
Contributor

Choose a reason for hiding this comment

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

btw we are missing these briefs now in actual attributes. You can add metric specific brief additionally to the ref

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, these are the briefs of the specific members not the attributes.
If we want to provide specific brief per metric family we would need to redefine the whole attribute's members I guess?
That sounds weird to me, that's why I propose to completely merge them and make the descriptions generic.
@open-telemetry/semconv-system-approvers what do you think about this?

Copy link
Contributor

Choose a reason for hiding this comment

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

I understand, you are correct we can't currently redefine specific members of enums

Copy link
Member Author

Choose a reason for hiding this comment

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

Keeping this open as I would love to get feedback from @open-telemetry/semconv-system-approvers here.
If we really want to provide specific descriptions for the enum's members per namespace then maybe this merging we are attempting here does not really make sense 🤔 ?

Copy link
Member

Choose a reason for hiding this comment

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

To me the deciding factor here is whether the different descriptions are clarifications or if they are truly different things. At a first glance, it sounds to me like they are clarifications

Copy link
Member Author

Choose a reason for hiding this comment

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

@braydonk @jamesmoessis any thoughts here?

Copy link
Member Author

Choose a reason for hiding this comment

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

We discussed about it during the last System Metrics WG (May 30th).

What we conclude on is that we would like to have the option to override the briefs and only use a subset of the defined members.
In that case the merging makes sense.


I see that open-telemetry/build-tools#192 would potentially solve this.
So I wonder if we should wait for it then.

/cc @trisch-me @lmolkova

model/registry/cpu.yaml Outdated Show resolved Hide resolved
model/registry/deprecated/process.yaml Outdated Show resolved Hide resolved
model/registry/deprecated/system.yaml Outdated Show resolved Hide resolved
model/registry/deprecated/container.yaml Outdated Show resolved Hide resolved
.chloggen/merge_cpu_states.yaml Outdated Show resolved Hide resolved
@ChrsMark ChrsMark force-pushed the merge_cpu_states branch 2 times, most recently from 57eee6d to beb92b9 Compare May 13, 2024 08:45
Copy link
Member

@joaopgrassi joaopgrassi left a comment

Choose a reason for hiding this comment

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

LGTM

I think you need to re-generate the make generate-gh-issue-templates though

@ChrsMark
Copy link
Member Author

Thank's @joaopgrassi. For some reason the make generate-gh-issue-templates does not change anything 🤔 .

Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
@ChrsMark
Copy link
Member Author

@open-telemetry/semconv-system-approvers could you take a look and specifically into the #1026 (comment)? Thank's.

<!-- NOTE: THIS FILE IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/attribute_namespace.md.j2 -->

# Cpu
Copy link
Contributor

@trisch-me trisch-me May 16, 2024

Choose a reason for hiding this comment

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

you need to update templates/registry/markdown/weaver.yaml and add CPU to the list of acronyms

brief: "When tasks of the cgroup are in kernel mode (Linux). When all container processes are in kernel mode (Windows)."
stability: experimental
stability: experimental
deprecated: 'Removed, report cpu state with `cpu.state` common attribute'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
deprecated: 'Removed, report cpu state with `cpu.state` common attribute'
deprecated: 'Replaced by `cpu.state`'

attributes:
- id: process.cpu.state
brief: "Deprecated, use `cpu.state` instead."
deprecated: 'Removed, report cpu state with `cpu.state` common attribute'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
deprecated: 'Removed, report cpu state with `cpu.state` common attribute'
deprecated: 'Replaced by `cpu.state`'

stability: experimental
brief: "Deprecated, use `cpu.state` instead."
stability: experimental
deprecated: 'Removed, report cpu state with `cpu.state` common attribute'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
deprecated: 'Removed, report cpu state with `cpu.state` common attribute'
deprecated: 'Replaced by `cpu.state`'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Discussions
Development

Successfully merging this pull request may close these issues.

Consider merging *.cpu.state metric attributes
5 participants