asgi-monitor 0.5.0

Last updated:

0 purchases

asgi-monitor 0.5.0 Image
asgi-monitor 0.5.0 Images
Add to Cart

Description:

asgimonitor 0.5.0

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 and Starlette
Logging support for Uvicorn and Gunicorn with custom UvicornWorker


[!IMPORTANT]
At this stage, the library is being tested and be careful in using it,
your participation in the development will be appreciated!

📚 Documentation
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

License:

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

Customer Reviews

There are no reviews.