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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a3424dd7625f3f63f4883f2f4df512deceb8f256efa56f223d5c9b00301a30f |
|
MD5 | 7eb4e0814dcb75f012e1670602d59c5b |
|
BLAKE2b-256 | a0aaaa1a42c0e0e0841cda909a4c30da5be09e8521982839f3c2547f67fad7eb |
Close
Hashes for aioworkers_prometheus-0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d165a8e206e225d69317ea448b6b75780215ac4ea46267c5c3596c512f350b48 |
|
MD5 | ca5cfd93de62ce2b7a0aefe9696d67f0 |
|
BLAKE2b-256 | 13993c68394653c77db8c462db2b6b7a1f3b7824b45fda64de7937302a4b0336 |