Skip to main content

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 environment variable can be used to set the statsd server connection parameters. This should take the form of a URL, such as udp://statsd.service:8675. 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

Documentation

https://sprocketsclientsstatsd.readthedocs.org

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

Version History

Available at https://sprocketsclientsstatsd.readthedocs.org/en/latest/history.html

Release files for sprockets.clients.statsd 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sprockets.clients.statsd 1.2.1
File Size Uploaded
sprockets.clients.statsd-1.2.1.tar.gz 5.6 kB Details

Release files / sprockets.clients.statsd-1.2.1.tar.gz

Download URL sprockets.clients.statsd-1.2.1.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
eccdfddc03cecadb0aa1e32d090ebf5db22b3e9c8a4eaeb370f50c226c839d35
BLAKE2b-256 checksum
How to use checksums
f553b3afc8007ab7d3cdf91b2f4954e2cdc9faeb3191bfc8dc41e98f5e2f7393
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.2.1 This release

1 release file

1.1.0

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page