You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Gian Luca (Jira)" <ji...@apache.org> on 2022/07/18 15:30:00 UTC

[jira] [Created] (KAFKA-14081) Cannot get my MetricsReporter implementation to receive meaningful metrics

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)