ReadyTalk/metrics-statsd — pull request #12 by mkeesey (2013-11-26 17:49:00+00:00)
Title: Centralize StatsD code, remove the appending of "count" to metric names, set versions to 4.0.0-SNAPSHOT for both libs

The convention in the statsd and graphite worlds is that metrics ending with the name "count" can be aggregated by summing values together and not through find the mean. Metrics sent to statsd through CodaHale metrics are already aggregated as statsd gauges so any additional aggregation by downstream metrics servers is unnecessary. To support this change, a lot more work happened. :smile:

1) Both metrics2 and metrics3 libraries no longer append ".count" to the raw values from metrics

2) To support this, the metrics2 library now uses the same statsd serialization classes that the metrics3 version has been using. This also implies that all metrics are sent as statsd gauges and never as other metric types. We were incorrectly sending some metrics as timers which told statsd to aggregate them when the Metrics library had already done so.

3) Updated the library versions for the metrics2 and metrics3 libraries to 4.0.0 - I felt we needed a new major version because the outputs are not strictly backwards compatible - we no longer append "count" to some of the metrics.

Sorry for the large changeset but I felt it was much less error prone to do slightly more work to centralize a lot of the statsd serialization logic than to update two different sets of logic. If you exclude 1bf3edc that will also remove the whitespace changes I made in that commit.