-
Notifications
You must be signed in to change notification settings - Fork 81
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
feature: pull web.disable-exporter-metrics functionality into this package #119
Comments
Great idea! I was just on my way to open a similar issue with a request to make it easy to disable the goCollector metrics as they seem only helpful during development but not in production for most exporters. Currently I do this by adding this line to the code of some exporters right after the MustRegister call (not knowing if it is a bad idea): |
I have also done this by replacing the default registerer/gatherer in my codebases. It'd be nice to not have to do this dance though, or filter out the go/process metrics in other ways. |
I think it would be useful to have a configuration struct/method for the default Go/Process collector. |
The clearest way to not use the collectors already pre-registered with the default registry is indeed to create your own registry (which is anyway recommended for any non-trivial Go program to avoid global state). The exporter metrics are somewhat different as they could be more than just those. Perhaps having that flag in https://github.com/prometheus/exporter-toolkit would make sense? |
Hello 👋 Looks like there was no activity on this issue for the last 3 months. Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗 |
Still desirable for consistency. |
I spun up a new exporter and noticed that the default registry now has 124 metrics. It would be nice to have a "light" mode that doesn't include a lot of the excessive details for simple exporters. For example, I don't really need these two detailed histograms most of the time. But it would be nice to have a flag to enable them.
|
Hello 👋 Looks like there was no activity on this issue for the last 3 months. Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗 |
I've moved this issue to the exporter-toolkit. |
The node_exporter implements a command-line flag
web.disable-exporter-metrics
that disables publishing the exporter's process stats. Pulling that functionality into this package with some sort of flag helper similar to promlog would allow all Go exporters to benefit from this behaviour without having to re-implement it.The text was updated successfully, but these errors were encountered: