fix: CONTENT_TYPE_LATEST typo caused backend crash on startup
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user