Skip to main content

A minimalistic statsd client used by sprockets.mixins.statsd

Project description

The sprockets.clients.statsd package implements a simple statsd client that is used by the sprockets.mixins.statsd package. It can be used in your applications for sending metric values to statsd.

The default statsd server that is used is localhost:8125. The STATSD_HOST and STATSD_PORT environment variables can be used to set the statsd server connection parameters. Note that the socket for communicating with statsd is created once upon module import and will not change until the application is restarted or the module is reloaded.

Version Downloads Status Coverage License

Installation

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

pip install sprockets.clients.statsd

Example

The following example demonstrates how to use sprockets.clients.statsd by incrementing a counter, setting a gauge value, and adding a timing value:

from sprockets.clients import statsd

# Increment foo.bar.baz by 1
statsd.incr('foo', 'bar', 'baz')

# Set a gauge value
statsd.set_gauge('foo', 'bar', 'baz', value=10)

# Add a timing value
statsd.add_timing('foo', 'bar', 'baz', value=3.14159)

Documentation is available at https://sprocketsclientsstatsd.readthedocs.org

Project details


Release history Release notifications

History Node

1.2.1

History Node

1.1.0

History Node

1.0.2

This version
History Node

1.0.1

History Node

1.0.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
sprockets.clients.statsd-1.0.1.tar.gz (4.9 kB) Copy SHA256 hash SHA256 Source None Aug 29, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page