Gian Luca created KAFKA-14081:
---------------------------------

             Summary: Cannot get my MetricsReporter implementation to receive 
meaningful metrics
                 Key: KAFKA-14081
                 URL: https://issues.apache.org/jira/browse/KAFKA-14081
             Project: Kafka
          Issue Type: Bug
          Components: clients
    Affects Versions: 3.3.0
            Reporter: Gian Luca


I want to extract metrics from KafkaProducer to export them to our company 
monitoring solution. At first I went for implementing {{MetricsReporter}} and 
registering my implementation through the "metric.reporters" config property. 
The class is correctly registered as it receives metric updates through 
{{metricChange()}} while KafkaProducer is being used. The problem is that all 
the metric values are stuck at zero (NaN in older versions of Kafka), even the 
most trivial (e.g. 'record-send-total').

If instead of using a report I simply poll the {{metrics()}} method of the 
KafkaProducer, then I see meaningful values: counters increasing over time, etc.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to