[ https://issues.apache.org/jira/browse/KAFKA-3868?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Liquan Pei reassigned KAFKA-3868: --------------------------------- Assignee: Liquan Pei > New producer metric record-size-avg does not provide average record size as > advertised > -------------------------------------------------------------------------------------- > > Key: KAFKA-3868 > URL: https://issues.apache.org/jira/browse/KAFKA-3868 > Project: Kafka > Issue Type: Bug > Components: producer > Affects Versions: 0.10.0.0 > Reporter: Ewen Cheslack-Postava > Assignee: Liquan Pei > > The metrics for record size are setup as such: > {code} > this.maxRecordSizeSensor = metrics.sensor("record-size-max"); > m = metrics.metricName("record-size-max", metricGrpName, "The > maximum record size"); > this.maxRecordSizeSensor.add(m, new Max()); > m = metrics.metricName("record-size-avg", metricGrpName, "The > average record size"); > this.maxRecordSizeSensor.add(m, new Avg()); > {code} > and then the values are recorded: > {code} > this.maxRecordSizeSensor.record(batch.maxRecordSize, now); > {code} > So the value provided by record-size-avg is the average maximum record size > with the average computed by batch, not the average size of the records being > sent as is suggested by "The average record size". We have all the necessary > info needed to compute the metric, but it needs to be done separately from > recording the batch.maxRecordSize values. -- This message was sent by Atlassian JIRA (v6.3.4#6332)