Fetching contributors…
Cannot retrieve contributors at this time
33 lines (21 sloc) 821 Bytes


kruxstatsd is a wrapper library around pystatsd. It will format stats based on a provided prefix (just like pystatsd), environment, and the host the client is running on. For example, incrementing the following stat on a host called

import kruxstatsd

k = kruxstatsd.StatsClient('js', env='stage')

will create a counter stat named ''.

Similarly, the following:

k.timing('foo', 'TIME')

will create a timer stat named ''.


To use kruxstatsd, simply import it instead of pystatsd. The interface is exactly the same. Context managers will also continue to work:

with k.timer('expensive_op'):