A library for easy and fast configuration of logging, tracing and metrics for ASGI applications.
Features:
- Prometheus metrics
- OpenTelemetry traces
- Structlog logging with native logging module support
- Integrations with Litestar, FastAPI, Starlette and Aiohttp
- Logging support for Uvicorn and Gunicorn with custom UvicornWorker
Installation
pip install asgi-monitor
Quickstart
from asgi_monitor.integrations.fastapi import setup_metrics, MetricsConfig
from fastapi import FastAPI
from uvicorn import run
def run_app() -> None:
app = FastAPI()
setup_metrics(app, MetricsConfig(app_name="fastapi"))
run(app, host="127.0.0.1", port=8000)
if __name__ == "__main__":
run_app()
After setting up, you can see visualization of default metrics in Grafana
The library originates from structlog-asgi
Metadata
Release files for asgi-monitor 0.7.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 | Provenance | Actions |
|---|---|---|---|---|
| asgi_monitor-0.7.0.tar.gz | 19.0 kB | Without provenance | Details for asgi_monitor-0.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| asgi_monitor-0.7.0-py3-none-any.whl | Python 3 | none | any | Details for asgi_monitor-0.7.0-py3-none-any.whl |
Total release size: 48.2 kB
Release files / asgi_monitor-0.7.0.tar.gz
| Download URL | asgi_monitor-0.7.0.tar.gz |
|---|---|
| Size | 19.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c1135173b6957e5201f753cfbc710c86b3e8038a0ed8eeea107ff9944850d57a
|
|
BLAKE2b-256 checksum How to use checksums |
dd3b7e297adff897f8d4dad442aaf22ebcd66d27964d7382779c78de09854e65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / asgi_monitor-0.7.0-py3-none-any.whl
| Download URL | asgi_monitor-0.7.0-py3-none-any.whl |
|---|---|
| Size | 29.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c094e2b969bc597238d57a79d06a17d1f1f0d5e2a1203202272fbe4ccf7b2bfa
|
|
BLAKE2b-256 checksum How to use checksums |
fe74184ee0697c64b5d055bd17d3961ade10e7ec538d400ea9fe9f1a7a131456
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for asgi-monitor 0.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.