With AG-213, a micrometer implementation was added to agroal with an AutoConfiguration. AgroalDataSourcePoolMetricsAutoConfiguration is @ConditionalOnBean(
), but it is not explicitly configured after AutoConfigurations that actually register these beans. The @Bean AgroalDataSource is defined in AgroalDataSourceConfiguration and for MeterRegistry-beans, it seems like after org.springframework.boot.actuate.autoconfigure.metrics.CompositeMeterRegistryAutoConfiguration is safest.
Changing @Configuration(proxyBeanMethods = false) to @AutoConfiguration(after =
{DataSourceAutoConfiguration.class, CompositeMeterRegistryAutoConfiguration.class}) should work as intended.
- is caused by
-
AG-213 Add micrometer implementation to promote metrics
- Closed