Enabling end-to-end latency monitoring
Learn how to enable end-to-end latency monitoring of Kafka topics using Streams
Messaging Manager (SMM). You need to edit the
producer.property files, start the producer in one terminal and the
consumer on another, and then open the SMM web UI for monitoring end-to-end
To enable the application start logging end-to-end latency metrics you use an interceptor for the Kafka client, which can be set through the configuration file.
Perform the following steps to enable the monitoring for the sample Java application and verify the latency in SMM.
consumer.propertiesfile and uncomment the following line:
producer.propertiesfile and uncomment the following line:
Start the producer on one terminal window with the following command:
java \ -cp ./target/kafka-client-avro-1.0-SNAPSHOT.jar \ com.cloudera.examples.MachineDataProducer \ ./producer.properties \ ./src/main/avro/MachineData.v1.avsc
Start the consumer on another terminal window with the following command:
java \ -cp ./target/kafka-client-avro-1.0-SNAPSHOT.jar \ com.cloudera.examples.MachineDataConsumer \ ./consumer.properties
- Navigate to , and select the environment where your Kafka cluster is running.
- On the Data Hubs tab of your environment, select the Kafka cluster you created.
- Click Streams Messaging Manager on the Services pane to open the SMM web UI.
- On the SMM UI, click Overview ().
Click on the profile icon () for the
machine-data-avrotopic to open the topic page.You see data in the charts
End-to-end latency. You may have to wait a few seconds until the charts appear.