-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Added support for non-default Prometheus CollectorRegistry #876
Conversation
Hi @llucherini, What was your use case to adding custom registration support? Since this current buggy form does not support multiple datasource and causing errors we need to fix this. However custom registration makes the code pretty much ugly to fix. |
Please see #851 |
BTW It is worth to mention
So I offer to revert this change which is causing ugly implementations to fix current buggy implementation. |
Hey. The use case is exactly the one stated in Prometheus javadocs, unit testing. |
thanks @llucherini. We will revert this change in favor or supporting multiple datasource at once. |
…dridge#876) * Added support for using a Prometheus CollectorRegistry other than the default one * Fixed a broken test
…dridge#876) * Added support for using a Prometheus CollectorRegistry other than the default one * Fixed a broken test
Hey.
This PR introduces a new constructor in
PrometheusMetricsTracker
and a constructor overload inPrometheusMetricsTrackerFactory
to enable configuration of whatever PromethesCollectorRegistry
one might want to use. It's completely backwards compatible and shouldn't affect any existing codebase relying on this.