BBC-News/alephant-broker — pull request #35 by Integralist (2014-12-08 08:09:17+00:00)
Title: Custom Metrics

![getinsertpic.com](http://media3.giphy.com/media/ZC2oDU6wHsCti/200.gif)

## Problem

We want to plug some custom metrics about the broker into AWS CloudWatch.

## Solution

Use the new [Alephant-Logger](https://github.com/BBC-News/alephant-logger) `metric` interface.

> Note: Alephant-Logger has been implemented in a way that means if the consumer of Alephant-Broker doesn't have a need for recording CloudWatch metrics then they simply don't wrap the Logger in the provided Decorator class (meaning any calls to `metric` become a no-op)