aioworkers-prometheus 0.5.1

Creator: codyrutscher

Last updated:

0 purchases

aioworkers-prometheus 0.5.1 Image
aioworkers-prometheus 0.5.1 Images

Languages

Categories

Add to Cart

Description:

aioworkersprometheus 0.5.1

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

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.