Adding the new rewrite

This commit is contained in:
Ketan Patel committed 2026-04-04 13:53:57 -04:00
1 parent 4aca9f08d1
commit 9b48b01d1d
62 files changed
+4510 -1406

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
"""Liveness, readiness, and Prometheus metrics endpoints (unauthenticated)."""
from fastapi import APIRouter
from fastapi.responses import JSONResponse, Response
from ..health import liveness, readiness
from ..metrics import render_metrics
router = APIRouter()
@router.get("/healthz")
async def healthz():
return liveness()
@router.get("/readyz")
async def readyz():
status, payload = readiness()
return JSONResponse(payload, status_code=status)
@router.get("/metrics")
async def metrics():
body, content_type = render_metrics()
return Response(content=body, media_type=content_type)