guardian/frontend — pull request #3322 by janua (2014-02-27 14:51:52+00:00)
Title: Facia cloudwatch metrics

This updates `SimpleCountMetric` to implement `AbstractMetric` so that the management pages keep working, but also to properly push into `Cloudwatch` via `getAndReset`. Keeping this interface means that it is easy to change over current metrics that are using the old `CountMetric`.

There are now two counters in `SimpleCountMetric`, one for the overall count of how many times it has been incremented, and the current count of increments since the last `Cloudwatch` push.

To use `CloudWatch`, you extend `CloudWatchApplicationMetrics` in the `Global` object of the project you want to start pushing metrics from, and then implement `applicationName` and `applicationMetrics`, where `applicationMetrics` is a `Map` of metrics you wish to push.