App fails to start when Dropwizard Metrics in pom
arsenaid opened this issue · 2 comments
arsenaid commented
Hi,
I am trying to add metrics using Dropwizard metrics library to my application. However, the application fails with errors below:
Field metricReader in de.codecentric.batch.configuration.MetricsConfiguration required a bean of type 'org.springframework.boot.actuate.metrics.reader.MetricReader' that could not be found.
- Bean method 'actuatorMetricReader' not loaded because @ConditionalOnMissingBean (types: org.springframework.boot.actuate.metrics.GaugeService; SearchStrategy: all) found bean 'dropwizardMetricServices'
- Bean method 'actuatorMetricRepository' not loaded because @ConditionalOnJava (older than 1.8) found 1.8
Are there any workarounds?
melroc83 commented
Did you solve the problem? I have the same issue...
dickerpulli commented
Spring Boot 2.x (and of cause spring-boot-starter-batch-web:2.0.1.RELEASE) comes with Micrometer to provide metrics. Look at https://docs.spring.io/spring-boot/docs/2.0.x-SNAPSHOT/reference/htmlsingle/#production-ready-metrics
Consider upgrading to 2.0.1.RELEASE