aioworkers prometheus integration
Project description
Use
metric:
registry: aioworkers
namespace: aioworkers_test_metric
metrics:
my_counter:
type: counter
name: test_counter
documentation: Counter for tests
my_histogram:
type: histogram
name: test_histogram
documentation: Histogram for tests
buckets: [30, 90, 100, 200, 400, 800]
Use in code
context.metric.my_counter.inc()
context.metric.my_histogram.observe(542)
with context.metric.my_histogram.time():
await asyncio.sleep(1)
Add global labels to default registry to exposition
prometheus:
registry: aioworkers
labels:
env: prod
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
File details
Details for the file aioworkers-prometheus-0.5.1.tar.gz
.
File metadata
- Download URL: aioworkers-prometheus-0.5.1.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91ed30fe0b297741cc00cf7112de84e01715dc0407174c466b4db994b3f30d78 |
|
MD5 | f00c51c41fae2aac78befb3f5c3e1d5d |
|
BLAKE2b-256 | 96cac72c8edc563b9e27c6fd11b5f77b2f0e33858c0ed4ff9bebe1b96ef87b97 |
File details
Details for the file aioworkers_prometheus-0.5.1-py3-none-any.whl
.
File metadata
- Download URL: aioworkers_prometheus-0.5.1-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0882f9d9296b000047b13a7b7c19c9a6318f6dd7b55812b07bfac96884e9b4b |
|
MD5 | 1e3e0d1fa39115b38ce939ab2acf69a6 |
|
BLAKE2b-256 | 521caf4ecb3a2ce8dee40eec54a80ce06712a23c4c26b22686d1f82ac450502c |