Difference between 'metric.reporters' and 'kafka.metrics.reporters' properties in Kafka

  1. Why there are two different properties for the purpose of metric reporting? What makes them different?
  2. If they are different then when to use which one?

1 Answer

Kafka uses 2 libraries for its metrics:

  • "Yammer" metrics: These are used mostly on the broker side

  • Kafka metrics: Kafka created its own metrics library and these are used in the clients.

As you may know, there's a bunch of common code (network, requests) that is used by both the broker and client side. As this code lives in the client side project this results in the broker having both types of metrics hence the 2 reporter types!

  • kafka.metrics.reporter is for the "Yammer metrics"
  • metric.reporters is for the "Kafka metrics"

Which one to use depends on what you want to see. You can have a custom reporter implement both interfaces if you want all the metrics. Also as all the metrics can also be made available via JMX, you may want to scrape that instead of relying on metrics reporters. Both solutions work in practice.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like