You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Ewen Cheslack-Postava (JIRA)" <ji...@apache.org> on 2016/06/20 00:37:05 UTC

[jira] [Created] (KAFKA-3868) New producer metric record-size-avg does not provide average record size as advertised

Ewen Cheslack-Postava created KAFKA-3868:
--------------------------------------------

             Summary: 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: Jun Rao


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)