we're building a monitoring system for our Spring Boot application using micrometer.
Metrics gathered are published to an Elasticsearch instance through micrometer-registry-elastic.
Everything is fine, except for:
kafka_consumer_fetch_manager_records_lagis always 0, even when I'm sure there's lag on the consumer groupkafka_consumer_fetch_manager_records_lag_avgis always 0, even when I'm sure there's lag on the consumer groupkafka_consumer_fetch_manager_records_lag_maxhas a value different from 0 only on the first measurement exposed.
All other metrics such as kafka_consumer_fetch_manager_records_lead are correctly set.
Versions involved:
spring-boot:2.5.4micrometer:1.7.3micrometer-registry-elastic:1.7.3spring-kafka:2.7.6kafka-clients:2.7.1Kafka broker: 2.7.0
I debugged the entire setup and there's no evidence of error, MicrometerConsumerListener is correctly created, even KafkaClientMetricsand all the Sensorinstances. I have no idea what's the problem, we haven't any particular customization and no error logging message.
It seems like there aren't samples with value different from 0 for the metrics above, but I'm pretty sure there's lag on the broker because I verified that through command line tool directly on the broker.
Any thoughts? Thanks a lot