Improve Metrics Integration with Prometheus Reporter #587
Labels
status: next major version
The issue will be considered for the next major version
status: pr submitted
A pull request has been submitted for the issue
type: enhancement
New feature or request
Feature description
Currently micronaut-kafka doesn't integrate with promethus metrics registry well. There are kafka metrics
records-consumed-total
with same name but different collection level (e.g., application, or topic, or partition level): https://docs.confluent.io/platform/current/kafka/monitoring.html#topic-level-fetch-metrics and https://github.com/apache/kafka/blob/39a555ba94a6a5d851b31e0a7f07e19c48327835/clients/src/main/java/org/apache/kafka/clients/consumer/internals/Fetcher.java#L1744-L1768However for prometheus metric reporter, it will compare tag signature with same metric names, and discard if mismatch. https://github.com/micrometer-metrics/micrometer/blob/b53e6e9327e58289d49b980ffde7e21c90a44983/implementations/micrometer-registry-prometheus/src/main/java/io/micrometer/prometheus/PrometheusMeterRegistry.java#L551-L564. So for prometheus users, 1) current value of
records-consumed-total
is inaccurate as it contains values from all collection levels, and 2) inconvenience to include more tags than default client-id.Here is a draft solution: #586. The idea is to prepend tag names to differentiate metric at different levels.
The text was updated successfully, but these errors were encountered: