AIOHTTP prometheus
HTTP metrics for a AIOHTTP application
Installing
pip install aiohttp-prometheus
Usage
from aiohttp import web
from aiohttp_prometheus import MetricsMiddleware, MetricsView
app = web.Application()
app.middlewares.append(MetricsMiddleware())
app.router.add_route('GET', '/metrics', MetricsView),
web.run_app(app)
Example output for metric route
# HELP aiohttp_http_requests_total Asyncio total Request Count
# TYPE aiohttp_http_requests_total counter
aiohttp_http_requests_total{handler="MetricsView",method="GET",status="2xx"} 7.0
# HELP aiohttp_http_request_duration_seconds Request latency
# TYPE aiohttp_http_request_duration_seconds histogram
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="0.01",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="0.05",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="0.1",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="0.5",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="0.75",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="1.0",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="2.5",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="5.0",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="7.5",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="10.0",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="15.0",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="20.0",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="30.0",method="GET"} 7.0
aiohttp_http_request_duration_seconds_bucket{handler="MetricsView",le="+Inf",method="GET"} 7.0
Metadata
Release files for aiohttp-prometheus 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aiohttp-prometheus-0.1.0.tar.gz | 2.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aiohttp_prometheus-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.9 kB
Release files / aiohttp-prometheus-0.1.0.tar.gz
| Download URL | aiohttp-prometheus-0.1.0.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a18b587148ff42d02044d99a17d64a5dbeb55748d67cd833c962eb37f98fe862
|
|
BLAKE2b-256 checksum How to use checksums |
bd232b9ee1564ee8614d6640db65fe8a9634549ff3d61febee1d1a8d74dd9a73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.4
|
Release files / aiohttp_prometheus-0.1.0-py3-none-any.whl
| Download URL | aiohttp_prometheus-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a887d5a748262df8cc34d24dbfb4542e312e5d1c4a3ea2d4c8dfbc2ffd11eaaf
|
|
BLAKE2b-256 checksum How to use checksums |
8c1fe2c5af3b856a895ff250b93b07b152b5c5096fb6acbb54c80c2b6a9beb28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.4
|