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

cpu statistics: add dimentions with mode="user|system" insetead of separate counter names? #21

Closed
flixr opened this issue Oct 23, 2017 · 3 comments

Comments

@flixr
Copy link
Contributor

flixr commented Oct 23, 2017

The cpu metrics were recently split from namedprocess_namegroup_cpu_seconds_total into namedprocess_namegroup_cpu_user_seconds_total and namedprocess_namegroup_cpu_system_seconds_total.
I'm wondering if it wouldn't be nicer to expose them under the old name and add an extra dimension with mode instead (basically like the node_exporter).
Then it would be backwards compatible and easier to extend if we wanted to expose other "modes" later as well...

@ncabatoff
Copy link
Owner

The only other modes exposed by the kernel on a per-process basis that I can see in proc(5) are guest_time and cguest_time, which I don't really see a compelling use case for.

In terms of backwards compatibility I prefer to drop metrics rather than change their labelsets. I don't like having metrics in Prometheus with a variable number of labels.

I do agree that it would be nicer to have user/system as labels of a metric rather than distinct metrics as they are now, just so you can sum() them. Now I just have to think of a new name for it...

@flixr
Copy link
Contributor Author

flixr commented Oct 23, 2017

There are also cutime and cstime, not really sure how useful they are though...

@ncabatoff
Copy link
Owner

Fixed in #84.

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

No branches or pull requests

2 participants