No project description provided
Project description
Muffin-Metrics – Send data to Graphite from Muffin application.
Requirements
python >= 3.3
Installation
Muffin-Metrics should be installed using pip:
pip install muffin-metrics
Usage
Add muffin_metrics to PLUGINS in your Muffin Application configuration.
Options
METRICS_BACKENDS – Graphite backends in format ([])
METRICS_BACKENDS = ( ('udp': 'udp://address:port'), ('tcp': 'tcp://address:port'), ) METRICS_DEFAULT = 'udp'
METRICS_DEFAULT – Default backend (None)
METRICS_FAIL_SILENTLY – Don’t raise connection’s exceptions (False)
METRICS_MAXUDPSIZE – Max size of UDP message (512)
METRICS_PREFIX – Prefix for metrics (muffin.)
Usage
@app.register('/my')
def my_view(request):
# Context manager (group metrics to pipeline and send them as one message)
with (yield from app.ps.metrics.client()) as metrics:
metrics.send(42, path='answer.to.the.ultimate.question')
# ...
metrics.send(31, path='some.some')
# Send data
yield from app.ps.metrics.send(100, path='one.hungred', backend='mybackend')
# Create client and send data
metrics = yield from app.ps.metrics.client(backend='tcp')
metrics.send(24, path='twenty.four')
metrics.disconnect()
Bug tracker
If you have any suggestions, bug reports or annoyances please report them to the issue tracker at https://github.com/klen/muffin-metrics/issues
Contributing
Development of Muffin-Metrics happens at: https://github.com/klen/muffin-metrics
Contributors
klen (Kirill Klenov)
License
Licensed under a MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for muffin_metrics-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | deed3681b56151ade5e1d927ca9bebbe90c473e5ceaeff906c4f80cb86236104 |
|
MD5 | e0588380647de539525b439fac26f014 |
|
BLAKE2b-256 | 7228e25fc28887581b62254dccb5c5c9bb86755a435118cad025768498cd7941 |