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: aioworker.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
Close
Hashes for aioworkers-prometheus-0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4616cb1fc111a587ff10fedc4da9f91df50da3b117576598ea66b43c6077d5d9 |
|
MD5 | 0e41160d1886ef06397a9f9ea98dd756 |
|
BLAKE2b-256 | 337ffbf7a531b7c8ae25d9281c93f7e3ee4f6a3fdc8249d68009991b49fcfe6e |