skip to navigation
skip to content

sprockets.mixins.statsd 1.0.1

Handler mixins for automated metric reporting

Latest Version: 1.3.1

The RequestMetricsMixin mixin will automatically instrument requests by sending statsd increment and timing values as each request finishes.


sprockets.mixins.statsd is available on the Python Package Index and can be installed via pip or easy_install:

pip install sprockets.mixins.statsd


The following RequestHandler will automatically increment a request counter and add a request duration timing value to statsd when the request finishes.

from sprockets.handlers.mixins import statsd
from tornado import web

class MyRequestHandler(stats.RequestMetricsMixin,

    def get(self, *args, **kwargs):
        self.finish({'hello': 'world'})

When the request has finished, the following keys would be used:

  • Counter: sprockets.counter.example.RequestHandler.GET.200
  • Timing: sprockets.timers.example.RequestHandler.GET.200
File Type Py Version Uploaded on Size
sprockets.mixins.statsd-1.0.1.tar.gz (md5) Source 2014-08-29 6KB