0

When I run locally I can see that kafka.consumer. are being collected. While when I deploy my service - I see that those metrics are not present.

I use kafka version 1.11.0, java 11 and Spring Boot 2.2.

How I can determine what is missing?

pixel
  • 24,905
  • 36
  • 149
  • 251

1 Answers1

4

In case anyone has this issue. I've had to explicitly add:

spring.jmx.enabled=true

It is needed since Kafka publishes data to jmx, and Micrometer reads it from there. By default jmx is disabled starting from Spring Boot 2.2.

It worked locally because IDEA added spring.jmx.enabled=true flag under the covers.

pixel
  • 24,905
  • 36
  • 149
  • 251