'Kafka consumer metric in Micronaut application
I have seen something confusing me when I am querying some Kafka consumer metrics of an application (Micronaut application with kafka integration) on NewRelic,
for example, I want to know about the total consumed records number, I can see
- kafka_consumer_records_consumed_total_records_total (1)
- kafka_consumer_fetch_manager_records_consumed_total (2)
The first one is a metric returned by /prometheus endpoint exposed by the application (the application is using Prometheus exporter and exposes an /prometheus endpoint by Micronaut)
The second one looks like the same metric but in a Kafka JMX Mbean syntax. I can see the below definition in the official Kafka consumer metrics document
Fetch Metrics
MBean: kafka.consumer:type=consumer-fetch-manager-metrics,client-id=”{client-id}”
records-consumed-total
The total number of records consumed.
These two metrics gave me a very different result (the second one gave a much more bigger value than the first one).
I would like to know what is the difference between these two metrics?
Regards.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
