Skip to main content

aioworkers-prometheus

https://github.com/aioworkers/aioworkers-prometheus/workflows/Tests/badge.svg https://codecov.io/gh/aioworkers/aioworkers-prometheus/branch/master/graph/badge.svg PyPI version Python versions

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)

Source distribution for aioworkers-prometheus 0.5.1
File Size Uploaded
aioworkers-prometheus-0.5.1.tar.gz 8.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aioworkers-prometheus 0.5.1
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.5.1 This release

2 release files

0.5

2 release files

0.4

2 release files

0.3.1

2 release files

0.3

1 release file

0.2

1 release file

0.1

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page