fix: CONTENT_TYPE_LATEST typo caused backend crash on startup
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 50s
Deploy to Production / Deploy Monitoring (push) Successful in 32s

CONTENT_TYPE_LSP doesn't exist in prometheus_client, causing ImportError.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-15 15:12:09 +02:00
parent 38b59ba48d
commit 4a992e2c90

View File

@@ -10,7 +10,7 @@ import logging
from starlette.middleware.base import BaseHTTPMiddleware
from starlette.requests import Request
from starlette.responses import Response
from prometheus_client import Counter, Histogram, generate_latest, CONTENT_TYPE_LSP
from prometheus_client import Counter, Histogram, generate_latest, CONTENT_TYPE_LATEST
logger = logging.getLogger(__name__)
@@ -82,4 +82,4 @@ class PrometheusMiddleware(BaseHTTPMiddleware):
def get_metrics() -> Response:
body = generate_latest()
return Response(content=body, media_type=CONTENT_TYPE_LSP)
return Response(content=body, media_type=CONTENT_TYPE_LATEST)