-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Configurable Metrics prefix #624
base: dev
Are you sure you want to change the base?
Conversation
Adding `metricsPrefix` field to HikariConfig and a default of "pool" because that's what it is currently. This is work towards brettwooldridge#615 Setting the metricsPrefix by default to the poolname + "pool" so that it matches what's going on in the CodahaleHealthChecker and it will be easier to update that and keep the old behavior for other people who don't need to set a custom prefix on there metrics.
Updated metrics related classes to use the metricsPrefix from HikariConfig rather than a combination of the poolname (from config) plus the hard coded word "pool". This gives more control to users who need to set the prefixes of their metrics to something specific such as the person who raised brettwooldridge#615
Seems to look good. With Metrics 4.x in the future HikariConfig would also need an API to provide metric tags because in Metrics 4.x (currently their master branch) their metrics name will be represented by an instance of So with Metrics 4.x you could do:
|
afff5b4
to
f0b3c52
Compare
3102584
to
eb0875c
Compare
6d319ab
to
7cacd0f
Compare
Hi! I saw issue 615 and figure'd it would be something pretty easy to do in a morning.
All the tests still pass, and I've written the update so that it wouldn't break anyone's metrics
that are relying on the hardcoded "pool" being added to the pool name as the base of the
metrics name.