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