Stackdriver/stackdriver-statsd-backend — pull request #4 by JaredReisinger (2014-04-16 18:00:59+00:00)
Title: Add "sourceFromPrefix" support to infer the instance name from the metric prefix.

We were contemplating using gossip_girl and a statsd cluster proxy to pre-aggregate our metrics (in order to reduce the network traffic between our network and Stackdriver's), and needed a way to (a) prevent the statsd cluster from commingling metrics from separate instances, and (b) ensure that the individual instances were preserved by the time the data got to Stackdriver. Our solution was to prefix the instance name when gossip_girl blabbed to the statsd cluster, and then extract/strip the prefix when the cluster machines flush to Stackdriver.