If I upgrade my Spring Boot Version from 2.1.6 to 2.2.2, I stop seeing some of the Kafka Consumer metrics in Prometheus like
- kafka_consumer_records_consumed_total_records_total
- kafka_consumer_records_lag_records
- kafka_consumer_fetch_latency_max_seconds
- kafka_consumer_bytes_consumed_total_bytes_total
I've a sample app to demonstrate this:
https://github.com/anoophp777/spring-boot-bug
Prometheus URL:
http://localhost:1010/management/prometheus
See readme. The app is in 2.2.2. Downgrade the spring boot version to 2.1.6 to note the Kafka Consumer metrics mentioned above.
I've a Stackoverflow issue open, but unresolved. Figured this to be a bug so reporting it.
https://stackoverflow.com/questions/59509831/prometheus-not-exporting-kafka-consumer-data-upon-upgrade-from-spring-boot-2-1-6
Comment From: snicoll
Kafka metrics are using JMX and JMX is disabled by default as of Spring Boot 2.2, see this duplicate issue for more details.