aioworkers prometheus integration
Project description
Use
metric:
registry: aioworkers
namespace: aioworkers_test_metric
metrics:
counter:
type: counter
name: test_counter
documentation: Counter for tests
histogram:
type: histogram
name: test_histogram
documentation: Histogram for tests
buckets: [30, 90, 100, 200, 400, 800]
Use in code
context.metric.counter.inc()
context.metric.histogram.observe(542)
with context.metric.histogram.time():
await asyncio.sleep(1)
Serve port 8000 for prometheus
prometheus:
port: 8000
registry: aioworkers
Push to graphite localhost:9090
prometheus:
registry: aioworkers
graphite:
address: localhost:9090
interval: 1m
prefix: aioworkers.test
Development
Install dev requirements:
pipenv install --dev --skip-lock
Run tests:
pipenv run pytest
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
Close
Hashes for aioworkers-prometheus-0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d6aaae7e771fb011939a6ca30b41a018ee7168522284ffbac7a09c521dd1403 |
|
MD5 | b5925c7fcc2ab6f792b183116caa2c26 |
|
BLAKE2b-256 | 8b8bce9c0f0ce59334df694943c97cadd4627f36ebb6a830888a4004678ee338 |
Close
Hashes for aioworkers_prometheus-0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b79a71483c44cdbd0ec8cfbf56ca9544aa9623d867f6363612ada8d76073e75c |
|
MD5 | 83e31a63040facd31c6f4ede043212db |
|
BLAKE2b-256 | 05efeb5f08d17a82d6262fbe7a44de710c75fdb6e16275471a56c328ed711824 |