pulsar-client-go
pulsar-client-go copied to clipboard
[client] Add MetricsRegisterer to ClientOptions
Add ClientOptions.MetricsRegisterer for customizing prometheus metrics registerer.
Motivation
Currently, client always use prometheus.DefaultRegisterer to register metrics, but the application might already have a registerer for metrics registering and exporting.
Modifications
Add ClientOptions.MetricsRegisterer to allow user to customize the metrics registerer. They can use the existed registerer in their applications.
Verifying this change
- [x] Make sure that the change passes the CI checks.
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
If yes was chosen, please highlight the changes
- Dependencies (does it add or upgrade a dependency): (no)
- The public API: (no)
- The schema: (no)
- The default values of configurations: (no)
- The wire protocol: (no)
Documentation
- Does this pull request introduce a new feature? (yes)
- If yes, how is the feature documented? (GoDocs)
- If a feature is not applicable for documentation, explain why?
- If a feature is not documented yet in this PR, please create a followup issue for adding the documentation