azavea/nyc-trees — pull request #91 by hectcastro (2014-11-19 16:04:05+00:00)
Title: Add support for django-statsd

This changeset adds django-statsd support and middleware integration in all environments. The middleware automatically emits metrics for model interactions, HTTP response codes, and view rendering timers. Additional
metrics can be emitted via:

```python
from django_statsd.clients import statsd

# Increments the "something_interesting" counter by 1
statsd.incr('something_interesting')
```

Metrics flow through:

```
Django (app) -> Statsite (services) -> Graphite (services)
```

Example graphs:

![django-statsd-timers](https://cloud.githubusercontent.com/assets/43639/5108914/afccfd40-6fdb-11e4-9df7-3490e5c692dd.png)
![django-statsd-http-status](https://cloud.githubusercontent.com/assets/43639/5108915/afd0b264-6fdb-11e4-8281-945dcee0facd.png)

Attempts to resolve #16.