paymog commented on PR #41199:
URL: https://github.com/apache/spark/pull/41199#issuecomment-1688686712

   I think this should actually be fixed in the statsd reporter. The [statsd 
spec](https://github.com/statsd/statsd/blob/master/docs/metric_types.md) says:
   
   > At each flush the current count is sent and reset to 0.
   
   However, looking at the 
[implementation](https://github.com/apache/flink/blob/master/flink-metrics/flink-metrics-statsd/src/main/java/org/apache/flink/metrics/statsd/StatsDReporter.java#L129-L131)
 of the statsd reporter, that spec doesn't seem to be followed. One possibility 
to fix upstream is to do something like the following:
   
   ```
       private void reportCounter(final String name, final Counter counter) {
           send(name, counter.getCount());
           counter.dec(counter.getCount());
       }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to