From e3dfad304e6c2ffc146cdb9bc25a1d683f289ace Mon Sep 17 00:00:00 2001 From: Jay Kreps Date: Tue, 1 Jul 2014 14:47:57 -0700 Subject: [PATCH] KAFKA-1498 Follow-up: add metric on avg record size. --- .../java/org/apache/kafka/clients/producer/internals/Sender.java | 1 + 1 file changed, 1 insertion(+) diff --git a/clients/src/main/java/org/apache/kafka/clients/producer/internals/Sender.java b/clients/src/main/java/org/apache/kafka/clients/producer/internals/Sender.java index 52d209b5022..37b9d1a462d 100644 --- a/clients/src/main/java/org/apache/kafka/clients/producer/internals/Sender.java +++ b/clients/src/main/java/org/apache/kafka/clients/producer/internals/Sender.java @@ -343,6 +343,7 @@ public class Sender implements Runnable { this.maxRecordSizeSensor = metrics.sensor("record-size-max"); this.maxRecordSizeSensor.add("record-size-max", "The maximum record size", new Max()); + this.maxRecordSizeSensor.add("record-size-avg", "The average record size", new Avg()); this.metrics.addMetric("requests-in-flight", "The current number of in-flight requests awaiting a response.", new Measurable() { public double measure(MetricConfig config, long now) {