Remove hard-coded percentiles from MicrometerMetricsTracker

Rather than hard-coding a client-side calculated percentile in HikariCP's code, it is best to leave these configuration decisions to HikariCP users in their code. Users can configure percentiles and whether to record a histogram for HikariCP metrics via a `MeterFilter`.

Resolves micrometer-metrics/micrometer#91
pull/1100/head
Tommy Ludwig 7 years ago
parent 9cf765911c
commit cc36894164

@ -39,19 +39,16 @@ public class MicrometerMetricsTracker implements IMetricsTracker
{
this.connectionObtainTimer = Timer.builder(METRIC_NAME_WAIT)
.description("Connection acquire time")
.publishPercentiles(0.95)
.tags(METRIC_CATEGORY, poolName)
.register(meterRegistry);
this.connectionCreation = Timer.builder(METRIC_NAME_CONNECT)
.description("Connection creation time")
.publishPercentiles(0.95)
.tags(METRIC_CATEGORY, poolName)
.register(meterRegistry);
this.connectionUsage = Timer.builder(METRIC_NAME_USAGE)
.description("Connection usage time")
.publishPercentiles(0.95)
.tags(METRIC_CATEGORY, poolName)
.register(meterRegistry);

Loading…
Cancel
Save