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: aioworker.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
Close
Hashes for aioworkers-prometheus-0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92b87a6a9deba26b4515ba71926a0f0c7e00893f4fc56ba8ed52f7fef55d3cbe |
|
MD5 | 80b0cf3b3f673380f17778d16a8da54c |
|
BLAKE2b-256 | 6baf481ab85dcdc42274f34c89521818a33672027457bd7ea1cb339c48347ca3 |