ITRS StatsD Client
Project description
itrsstatsd
Python module for publishing custom metrics to an ITRS StatsD server.
The module is part of the Orchestrated Netprobe solution for collecting metrics in orchestrated environments. See the docs for complete details.
Requirements
- Python 3.7
Installation
The module is available via PyPI:
pip3 install itrsstatsd
Module Documentation
How to get and use a statsd API handle:
pydoc3 itrsstatsd
API documentation:
pydoc3 itrsstatsd.api
Units of measure documentation:
pydoc3 itrsstatsd.units
Getting Started
from itrsstatsd import build_statsd
from itrsstatsd.units import Unit
# Create an instance of the client that sends to localhost:8125
statsd = build_statsd()
# Optionally add dimension(s) to all metrics
statsd.default_dimensions(app_name="pyapp")
# Record some metrics
statsd.increment("failed_logins")
statsd.gauge("cache_size", 52.5, Unit.Megabytes)
statsd.timer("query_time", 56)
Refer to the pydoc for complete usage details.
Change Log
v1.3.0 (2019-09-11)
New Features:
- License changed to BSD 3-Clause
- C2-77: Nano and micro resolution in timer metrics
Resolved:
- C2-78: Statsd client sends malformed message with sample rate
v1.2.0 (2019-08-23)
New Features:
- C2-72: Discard oldest metrics when sending queue full
v1.1.0 (2019-08-23)
New Features:
- C2-69: Statsd over TCP
v1.0.0 (2019-08-15)
First version.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
itrsstatsd-1.3.0.tar.gz
(8.1 kB
view hashes)
Built Distribution
itrsstatsd-1.3.0-py3-none-any.whl
(11.0 kB
view hashes)
Close
Hashes for itrsstatsd-1.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cabe3a57ca334e7d822f5b571215094777e65252af935e8cfd46170f46e5feb9 |
|
MD5 | 64298fc796e3a584222dab5056c298d1 |
|
BLAKE2b-256 | 376f1af755a2cee5b27d31a1f7c07efc32d2b8a69a6bca5aa239686ae43f72a8 |