[ https://issues.apache.org/jira/browse/SAMZA-349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14070864#comment-14070864 ]
Martin Kleppmann commented on SAMZA-349: ---------------------------------------- bq. Also, since we only refresh the metrics in MetricsSnapshotReporter (kafka metrics stream) but do not reset in the JMX report, will this be a little confusing for users? I'm a little concerned about that. I would say that adding a reporter to your job config should not alter the values of the metrics that are reported. However, adding MetricsSnapshotReporter does just that. Rather than resetting, how about having MetricsSnapshotReporter track the previous value for each counter, and report the difference? That would remove the side-effect. > MetricsSnapshotReporter does not refresh metrics every 60 seconds > ----------------------------------------------------------------- > > Key: SAMZA-349 > URL: https://issues.apache.org/jira/browse/SAMZA-349 > Project: Samza > Issue Type: Bug > Reporter: Yan Fang > Assignee: Yan Fang > Attachments: SAMZA-349.1.patch, SAMZA-349.patch > > > If my understanding is correct, the metrics we provide are for every 60 > seconds and all counters will be reset every 60 seconds. Current the > MetricsSnapshotReporter seems missing this implementation. It sends out the > metrics every 60 seconds but does not reset the counter value. > {code} > registry.getGroup(group).foreach { > case (name, metric) => > metric.visit(new MetricsVisitor { > def counter(counter: Counter) = groupMsg.put(name, > counter.getCount: java.lang.Long) > def gauge[T](gauge: Gauge[T]) = groupMsg.put(name, > gauge.getValue.asInstanceOf[Object]) > }) > } > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)