Description
client_python version: testing on 0.15.0 but the offending code exists in the master branch as well.
I'm trying to use the prometheus ASGI handler with Hypercorns DispatcherMiddleware. It sends lifecycle events which are not properly handled:
def make_asgi_app(registry: CollectorRegistry = REGISTRY, disable_compression: bool = False) -> Callable:
"""Create a ASGI app which serves the metrics from a registry."""
async def prometheus_app(scope, receive, send):
assert scope.get("type") == "http"
# Prepare parameters
assert scope.get("type") == "http"
ensures any ASGI middleware sending lifecycle events will fail to start the prometheus asgi app.
Metadata
Metadata
Assignees
Labels
No labels