wolph / python-statsd

Python Client for the Etsy NodeJS Statsd Server
http://readthedocs.org/docs/python-statsd/en/latest/
BSD 3-Clause "New" or "Revised" License
110 stars 39 forks source link

Naming on metrics is not consistent #17

Closed alfredodeza closed 12 years ago

alfredodeza commented 12 years ago

I am not sure if this is a problem with how python-statsd is sending its data or how StatsD is processing and relaying to graphite, but there is some inconsistency that makes it hard to maintain a naming convention when sending metrics over.

For example, for counters, if we use a "my_counter" name, it displays like this on Graphite:

Graphite
`-- stats
    `-- my_counter

But for gauges or timers, they would add a prepending name depending on the name of the metric. So the above example will end up looking like this:

Graphite
`-- stats
    |-- timers
    |   |-- my_timer
    |-- gauges
    |   |-- my_gauge
    `-- my_counter

So timers and gauges prepend their name, but counters do not. If we try to use a naming convention (e.g. server name) it would be difficult to try and keep an order because of this.

I wasn't able to effectively find out what is missing here, but as far as I can tell python-statsd is sending the information correctly, without mangling the names we use.

Any ideas?

alfredodeza commented 12 years ago

It seems this is a lack of configurability on StatsD's end. They should (soon?) be including this as a new feature.

wolph commented 12 years ago

Hi Alfredo,

This is indeed something done by StatsD internally, although it would be possible to hack this in on the python-statsd end, I personally don't think it's the way to go. If needed this is easy to fix in a tiny wrapper class when using it.

It would be great if they would fix this.

Thanks for the report :)

alfredodeza commented 12 years ago

Just as a reference, this is the pull request that should bring the ability to have configurable names: https://github.com/etsy/statsd/pull/137