Micrometer: DataSource configure does not support Spring boot 2.0

Created on 24 Apr 2018  路  1Comment  路  Source: micrometer-metrics/micrometer

Hi

I have used the io.micrometer:micrometer-spring-legacy:1.0.3 integrate with Spring Boot 2.0.1 Release Version.
But i have found the class "DataSourcePoolMetadataProvider" use wrong package.
It is reference "import org.springframework.boot.autoconfigure.jdbc.metadata.DataSourcePoolMetadataProvider;" in this class "io.micrometer.spring.jdbc.DataSourcePoolMetricsAutoConfiguration".
In spring boot 2.0.1 this class "DataSourcePoolMetadataProvider" stay in the "org.springframework.boot.jdbc.metadata" package.
So i can integrate with micrometer and spring boot now.
Do you have any suggestion with it?
Thanks a lot.

question

Most helpful comment

Micrometer auto-configuration for Spring Boot 2 is in Spring Boot itself. You shouldn't use the micrometer-spring-legacy dependency with Spring Boot 2, as noted here in the documentation:

As of Spring Boot 2.0.0.M5, Micrometer is the instrumentation library powering the delivery of application metrics from Spring. The micrometer-spring-legacy module provides drop-down support for Spring Boot 1.5.x.

Spring Boot will auto-configure the DataSource metrics as mentioned in the corresponding Spring Boot documentation. It shouldn't require you to configure anything additionally for DataSource metrics.

Let me know if we can improve the documentation somehow to avoid any confusion.

>All comments

Micrometer auto-configuration for Spring Boot 2 is in Spring Boot itself. You shouldn't use the micrometer-spring-legacy dependency with Spring Boot 2, as noted here in the documentation:

As of Spring Boot 2.0.0.M5, Micrometer is the instrumentation library powering the delivery of application metrics from Spring. The micrometer-spring-legacy module provides drop-down support for Spring Boot 1.5.x.

Spring Boot will auto-configure the DataSource metrics as mentioned in the corresponding Spring Boot documentation. It shouldn't require you to configure anything additionally for DataSource metrics.

Let me know if we can improve the documentation somehow to avoid any confusion.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ITman1 picture ITman1  路  4Comments

ffeltrinelli picture ffeltrinelli  路  4Comments

wilkinsona picture wilkinsona  路  3Comments

wilkinsona picture wilkinsona  路  3Comments

exploder86 picture exploder86  路  3Comments