Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring Boot - Consider defining a bean of type 'io.micrometer.core.instrument.MeterRegistry' in your configuration

I've spent a few days and could not get it working, new to instrumentation in spring. I have attached picture of my project dependency tree it shows both micrometer-core and spring-boot-starter-actuator.

Error- Consider defining a bean of type 'io.micrometer.core.instrument.MeterRegistry' in your configuration.

Adding my application.yml config

management:
 endpoints:
  web:
   exposure:
    include: info, health, loggers, prometheus
 metrics:
  web:
   server:
    request:
      autotime:
        percentiles: 0.50,0.75,0.95,0.99

enter image description hereenter image description here

like image 735
Loren Avatar asked Oct 24 '25 07:10

Loren


1 Answers

My issue was I didn't have the actuator as a dependency for my application

<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

Don't forget to reload your dependencies if you don't have it automatically configured.

like image 159
Austin Poole Avatar answered Oct 26 '25 22:10

Austin Poole



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!