aioworkers-prometheus
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
Metadata
Release files for aioworkers-prometheus 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aioworkers-prometheus-0.5.1.tar.gz | 8.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aioworkers_prometheus-0.5.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.2 kB
Release files / aioworkers-prometheus-0.5.1.tar.gz
| Download URL | aioworkers-prometheus-0.5.1.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
91ed30fe0b297741cc00cf7112de84e01715dc0407174c466b4db994b3f30d78
|
|
BLAKE2b-256 checksum How to use checksums |
96cac72c8edc563b9e27c6fd11b5f77b2f0e33858c0ed4ff9bebe1b96ef87b97
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|
Release files / aioworkers_prometheus-0.5.1-py3-none-any.whl
| Download URL | aioworkers_prometheus-0.5.1-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e0882f9d9296b000047b13a7b7c19c9a6318f6dd7b55812b07bfac96884e9b4b
|
|
BLAKE2b-256 checksum How to use checksums |
521caf4ecb3a2ce8dee40eec54a80ce06712a23c4c26b22686d1f82ac450502c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|