strimzi / metrics-reporter

Prometheus Metrics Reporter for Apache Kafka server and client components
Apache License 2.0
5 stars 10 forks source link

Consider removing the kafka_server prefix added to all Yammer metrics #50

Closed mimaison closed 1 month ago

mimaison commented 1 month ago

We currently inject the kafka_server_ prefix to all Yammer metrics. https://github.com/strimzi/metrics-reporter/blob/main/src/main/java/io/strimzi/kafka/metrics/yammer/YammerMetricWrapper.java#L44

The original idea was to made all broker-side metrics start with the same prefix to get a similar behavior than client-side metrics (all producer metrics start with kafka_producer_, same for the consumer, Streams and Connect).

However this creates some issues:

For these 2 reasons, I propose removing the kafka_server_ prefix we add to Yammer metrics.

Here is a gist comparing both the current output and the output if the remove the prefix: https://gist.github.com/mimaison/6731c7f088080e4d766c87f3280e2814

mimaison commented 1 month ago

@k-wall @OwenCorrigan76 thoughts?

OwenCorrigan76 commented 1 month ago

@mimaison Yes that is much cleaner. I hadn't noticed kafka_server_kafka_server_<METRIC>.

It makes sense to drop the prefix, especially if the previous way (using JMX) did not have the kafka_server_ prefix.

k-wall commented 1 month ago

+1