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
Built Distribution
Close
Hashes for aioworkers-prometheus-0.3.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d7980c79b32498a85be9a70dea629dde16d4ef2d1870ac92279cc7688f84760 |
|
MD5 | 9751e139774ae3444634700f7a10a89b |
|
BLAKE2b-256 | a067fc0c01136e79f0a5d5ffe85791a1475891a91d56b6c719b9b0ee6e05e622 |
Close
Hashes for aioworkers_prometheus-0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b161e1e71a9fa7c66c6f6db0930ee71799cc4ab67cff05a691986953d19e9238 |
|
MD5 | e52abe0542b1bf90742979c622f51e5c |
|
BLAKE2b-256 | 0bb5048a03729487a67cebe5cbabe1ae3ed135d458e01553cbafcc91580acd0e |