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
File details
Details for the file muffin-metrics-0.0.3.tar.gz
.
File metadata
- Download URL: muffin-metrics-0.0.3.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 634d6e5e1c5152b68d1cb699e348d24907430d74440a09491572b6f754180128 |
|
MD5 | 712ce7bc5601ae8821b8bb7287e4cb14 |
|
BLAKE2b-256 | 495d180daf0cb47be8453b39e0d0dd97951da247cbfff88ace45a47a88b4ad1b |
File details
Details for the file muffin_metrics-0.0.3-py2.py3-none-any.whl
.
File metadata
- Download URL: muffin_metrics-0.0.3-py2.py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff168dc074fdacebec420151af2c64722bf39fbac1c6321faf46fab22cbfad13 |
|
MD5 | 1fbf5fc0eee2719cfb4337474e2cdb6c |
|
BLAKE2b-256 | db3ee57a486afc9a9215e0e4c0daaafeecb33b6f1a5c20132791adbebcdc6bb7 |