alphagov/release — pull request #27 by nickstenning (2013-04-24 18:09:55+00:00)
Title: Deploy stats! (Oh, and application shortnames)

So, this was initially a 5-line PR to add Statsd reporting for deployments. Unfortunately, in order to add deployments to graphite in a way that doesn't make me angry every time I look at it, I've needed to add a little more information to the release app database. Specifically, applications now have a `shortname`, which is the puppet/graphite name for that application, and which is used to construct the statsd key.

So, this adds a `shortname` field to the `Application` model, which if not explicitly set falls back to the repository name (e.g. `foo` if the repo is `alphagov/foo`), and then increments a statsd counter of the form `deploys.` every time that application is deployed in production.