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

"total" appended as subname when using timer decorator #11

Closed dsyang closed 12 years ago

dsyang commented 12 years ago

I do something like

t = statsd.Timer("MyApp")
@t.decorate("function"):
def f():
   ...

I want to send "MyApp.function: 100|ms" Instead,"MyApp.function.total: 100|ms" is sent. with no way to remove the total

Looking at the source, I don't see an easy way to change this. Thoughts?

wolph commented 12 years ago

Hi Dan,

You are right, there was no way to change it. I have just created a new version which does support this, in the tests you can find an example on how to use it: https://github.com/WoLpH/python-statsd/blob/master/tests/timer.py

dsyang commented 12 years ago

Thanks Rick!