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.5b5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee72033f8ced2b2cbc65477bbc10446e56e039e288073a24abedf10934f81bb9 |
|
MD5 | 3e8028e2bf7d781ae058388ef40a35de |
|
BLAKE2b-256 | 93af56d612d2511b80e9debb963e33b573946f306add22b7db7ec6becc6ee02b |
Close
Hashes for aioworkers_prometheus-0.5b5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4fbe93461423eb923c3e60a7275317cafd9dec8dc196f7a26a42293eacb500a |
|
MD5 | 2659f63e19b392037cda5db72c699cd5 |
|
BLAKE2b-256 | 7c552c188c20698c8f74bad516aecc2c1ded766fc967eefe84448697963dd8ad |