A lightweight Python client for StatsD, extending the basic StatsD protocol with DogStatsD-compatible tags. It simplifies sending metrics with key-value tags to StatsD servers that support the DataDog extension. The current version is 3.2.1.post1, and the project is actively maintained with a stable release cadence.
pip install statsd-tagsVerified import paths — ran on the pinned version, not inferred.
Initialize the `StatsClient` with a host, port, optional prefix, and default tags. Then use methods like `incr`, `gauge`, and `timing` to send various metric types, providing specific tags for each metric call that override or merge with default client tags.
Ensure your StatsD server (e.g., Datadog Agent, Telegraf with DogStatsD input) is specifically configured to handle DogStatsD-formatted metrics. Test with a simple tagged metric to confirm proper tag processing.
Always use `from statsd_tags import StatsClient` (or other symbols) in your Python code, not `from statsd-tags import ...`.
Verify network connectivity between your application and the StatsD server (e.g., `netcat -u -z <host> <port>`). Ensure no firewalls are blocking UDP traffic on the StatsD port (default 8125). Monitor the StatsD server logs for incoming metrics to confirm receipt.
No dependency data recorded yet.