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: 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
Close
Hashes for aioworkers-prometheus-0.5b4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca806bb38e5a47330e58d2207a70e1e4cf2c1158678c7cc7497392fcdf8a5716 |
|
MD5 | c1a53cc58e22e1c753aca3632d2889da |
|
BLAKE2b-256 | cc1ace704bc5b29c2e950945c12c6f153986a368c69f83a9be9e1a5731e3cfad |
Close
Hashes for aioworkers_prometheus-0.5b4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6787005623b53e28650ad55f704b6dd9b756e06aa72ec906754a89c318358b93 |
|
MD5 | 1b8a1bded26fd4fe8a8d11cdfdd3c5c0 |
|
BLAKE2b-256 | 36b77b82d523052033a5cf143d4970e827cc14060f83fac9fa523d89ca291bc3 |