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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2578d49d44a2cfa9ab4c17c42139bca6b5b50d225ce3f8f3d1670a65f94255b |
|
MD5 | 255f61d3e2d6de52cbb866b62c5d07db |
|
BLAKE2b-256 | 51f360da77d510a11375656af31e61de46f7d96735b92dbf15db047674b4d891 |