See gh-12129
pull/12149/head
Stephane Nicoll 7 years ago
parent 5e61b646fa
commit 45476961c1

@ -51,8 +51,11 @@ class HikariDataSourceMetricsPostProcessor implements BeanPostProcessor {
private void bindMetricsRegistryToHikariDataSource(MeterRegistry registry,
HikariDataSource dataSource) {
dataSource.setMetricsTrackerFactory(
new MicrometerMetricsTrackerFactory(registry));
if (dataSource.getMetricRegistry() == null
&& dataSource.getMetricsTrackerFactory() == null) {
dataSource.setMetricsTrackerFactory(
new MicrometerMetricsTrackerFactory(registry));
}
}
private MeterRegistry getMeterRegistry() {

Loading…
Cancel
Save