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

Fix units of process.open_file_descriptor.count and process.context_switches #1797

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

Conversation

ChrsMark
Copy link
Member

@ChrsMark ChrsMark commented Jan 23, 2025

Fixes #1662

Changes

This PR fixes the units of process.open_file_descriptor.count and process.context_switches metrics.
I was not sure if it should be {open_file_descriptor} or just {file_descriptor} but went with what was proposed in #1662.

Merge requirement checklist

@ChrsMark ChrsMark requested review from a team as code owners January 23, 2025 14:59
@ChrsMark ChrsMark self-assigned this Jan 23, 2025
@braydonk
Copy link
Contributor

I believe {open_file_descriptor} is correct as a unit to match the name. This does make me wonder if the word open even needs to be in the name though; file_descriptor itself implies that it's open. Let's merge this though, and I'll make a separate issue for that now.

@@ -81,15 +81,15 @@ groups:
stability: experimental
brief: "Number of file descriptors in use by the process."
instrument: updowncounter
unit: "{count}"
unit: "{open_file_descriptor}"
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe {descriptor} or {file_descriptor}?

I assume that if we had some other counter for file descriptors, it'd be right to use the same unit

Copy link
Member

Choose a reason for hiding this comment

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

^ +1

Copy link
Member Author

Choose a reason for hiding this comment

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

Answerwing with my original concern from the PR description :) :

I was not sure if it should be {open_file_descriptor} or just {file_descriptor} but went with what was proposed in #1662.

It makes sense to change it to file_descriptor all together as @braydonk suggests at #1797 (comment).

I'm fine if we want to merge this one and iterate on it, or if we want to fix in a different PR entirely.

Copy link
Contributor

@braydonk braydonk Jan 28, 2025

Choose a reason for hiding this comment

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

Let's merge this PR with the suggested change to {file_descriptor}, I opened #1798 and if folks all agree we can make the metric name change as part of that.

@@ -81,15 +81,15 @@ groups:
stability: experimental
brief: "Number of file descriptors in use by the process."
instrument: updowncounter
unit: "{count}"
unit: "{open_file_descriptor}"
Copy link
Member

Choose a reason for hiding this comment

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

^ +1

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

Successfully merging this pull request may close these issues.

process.open_file_descriptor.count and process.context_switches both have unexpected unit {count}
5 participants