bitly / statsdaemon

an implementation of Etsy's statsd in Go
The Unlicense
570 stars 131 forks source link

add -prefix flag to add a prefix to all stat paths #35

Closed encryptio closed 9 years ago

encryptio commented 9 years ago

I'm trying to run statsdaemon on every box in a cluster of machines, and need to add a prefix to every stat that includes the hostname (which then avoids duplicating the hostname getting and cleaning logic out of every application sending stats.)

This patch adds a -prefix option which allows you to add an arbitrary prefix to all stats sent to the daemon.

The whitespace and parentheses changes are from a go fmt run; they should be committed, but aren't part of this change.

jehiah commented 9 years ago

Great addition. thanks!