Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Adding optional prefixes and labels to ProcessCollector metrics via custom registry initialization #518

Open
glitchy opened this issue May 1, 2024 · 1 comment

Comments

@glitchy
Copy link

glitchy commented May 1, 2024

Is your feature request related to a problem? Please describe.

  • being a global static, there is not a way for the process metrics created by enabling the process feature flag to acquire optional/dynamic prefix/labels

Describe the solution you'd like

  • extend the ProcessCollector the ability to take optional prefix/labels, allowing the user to implement/manage their own

Describe alternatives you've considered

  • iterate through all the gathered metric families and metrics and add my labels (too much overhead)
  • making my service a scrape target (too much overhead)

Additional context

  • there are some use cases where this is warranted, such a distributed compute platform where incurring the extra overhead from the prometheus scrape interval for every worker node is unnecessary when the worker heartbeats/metrics are already gathered at a single point elsewhere (eg. scheduler node) that can be scraped and where the resource overhead is preferred.
@karlem
Copy link

karlem commented Nov 5, 2024

Hey! Big +1 for this feature—definitely see the need here. One possible alternative could be adding a separate feature flag, like process-custom, which would export the process_collector without automatically registering it in the default registry. This way, it could be registered manually as needed.

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

No branches or pull requests

2 participants