blacklocus / metrics-cloudwatch

A reporter for codahale metrics to Amazon CloudWatch
Apache License 2.0
61 stars 27 forks source link

make submission of 0 values configurable #14

Open dirkraft opened 9 years ago

dirkraft commented 9 years ago

This logic should be configurable: https://github.com/blacklocus/metrics-cloudwatch/blob/master/src/main/java/com/blacklocus/metrics/CloudWatchReporter.java#L268-L272

Currently 0 values for counter-based metrics are omitted to save on API requests.

This should be configurable because 0 values may be significant in certain contexts.

Example 10 machines submit a counter at intervals of 1 minute. The counter is of the number of work items processed in the last minute. Over the last minute, machines 1-9 accomplished 1 work unit and each submitted a metric with value 1, and machine 10 accomplished 0 work units and submitted no metric at all.

Currently: CloudWatch over last minute

Most developers would probably want a more representative aggregation: