django_statsd Package

django_statsd Package

django_statsd.__init__.decr(key, value=1)[source]
django_statsd.__init__.incr(key, value=1)[source]
django_statsd.__init__.start(key)[source]
django_statsd.__init__.stop(key)[source]
django_statsd.__init__.with_(key)[source]
django_statsd.__init__.wrapper(prefix, f)[source]
django_statsd.__init__.named_wrapper(name, f)[source]
django_statsd.__init__.decorator(prefix)[source]

settings Module

django_statsd.settings.STATSD_DEBUG = True

Enable warnings such as timers which are started but not finished. Defaults to DEBUG if not configured

django_statsd.settings.STATSD_DISABLED = False

Statsd disabled mode, avoids to send metrics to the real server. Useful for debugging purposes.

django_statsd.settings.STATSD_HOST = '127.0.0.1'

Statsd host, defaults to 127.0.0.1

django_statsd.settings.STATSD_PORT = '8125'

Statsd port, defaults to 8125

django_statsd.settings.STATSD_PREFIX = 'some_key_prefix'

Set the global statsd prefix if needed. Otherwise use the root

django_statsd.settings.STATSD_SAMPLE_RATE = 1.0

Statsd sample rate, lowering this decreases the (random) odds of actually submitting the data. Between 0 and 1 where 1 means always

django_statsd.settings.STATSD_TAGS_LIKE = None

Enable creating tags as well as the bare version. This causes an ajax view to be stored both as the regular view name and as the ajax tag. Supported separators are _is_ and =

django_statsd.settings.STATSD_TRACK_MIDDLEWARE = True

Enable tracking all requests using the middleware

django_statsd.settings.STATSD_VIEWS_TO_SKIP = ['django.contrib.admin']

List of regexp to ignore views.

django_statsd.settings.get_setting(key, default=None)[source]

celery Module

database Module

class django_statsd.database.TimingCursorWrapper[source]

Bases: object

execute(*args, **kwargs)[source]
executemany(*args, **kwargs)[source]

json Module

middleware Module

class django_statsd.middleware.Client(prefix='view')[source]

Bases: object

class_

alias of statsd.client.Client

get_client(*args)[source]
submit(*args)[source]
class django_statsd.middleware.Counter(prefix='view')[source]

Bases: django_statsd.middleware.Client

class_

alias of statsd.counter.Counter

decrement(key, delta=1)[source]
increment(key, delta=1)[source]
submit(*args)[source]
class django_statsd.middleware.DummyWith[source]

Bases: object

class django_statsd.middleware.StatsdMiddleware(get_response=None)[source]

Bases: django.utils.deprecation.MiddlewareMixin

cleanup(request)[source]
process_exception(request, exception)[source]
process_request(request)[source]
process_response(request, response)[source]
process_template_response(request, response)[source]
process_view(request, view_func, view_args, view_kwargs)[source]
scope = <thread._local object>
classmethod skip_view(view_name)[source]
classmethod start(prefix='view')[source]
classmethod stop(*key)[source]
class django_statsd.middleware.StatsdMiddlewareTimer(get_response=None)[source]

Bases: django.utils.deprecation.MiddlewareMixin

process_exception(request, exception)[source]
process_request(request)[source]
process_response(request, response)[source]
process_template_response(request, response)[source]
process_view(request, view_func, view_args, view_kwargs)[source]
class django_statsd.middleware.Timer(prefix='view')[source]

Bases: django_statsd.middleware.Client

class_

alias of statsd.timer.Timer

start(key)[source]
stop(key)[source]
submit(*args)[source]
class django_statsd.middleware.WithTimer(timer, key)[source]

Bases: object

django_statsd.middleware.decorator(prefix)[source]
django_statsd.middleware.decr(key, value=1)[source]
django_statsd.middleware.incr(key, value=1)[source]
django_statsd.middleware.named_wrapper(name, f)[source]
django_statsd.middleware.start(key)[source]
django_statsd.middleware.stop(key)[source]
django_statsd.middleware.with_(key)[source]
django_statsd.middleware.wrapper(prefix, f)[source]

redis Module

templates Module

urls Module

class django_statsd.urls.StatsdHTTPConnection(*args, **kwargs)[source]

Bases: httplib.HTTPConnection

close(*args, **kwargs)[source]
connect(*args, **kwargs)[source]

utils Module

django_statsd.utils.get_client(name, connection=None, class_=<class 'statsd.client.Client'>)[source]
django_statsd.utils.get_connection(host=None, port=None, sample_rate=None, disabled=None)[source]
django_statsd.utils.get_counter(name, connection=None)[source]
django_statsd.utils.get_timer(name, connection=None)[source]