INNER CODE UNIT · Python

metrics

kaito-project/kaito · presets/ragengine/main.py:227

async def metrics():
    """
    Expose Prometheus metrics.
    Returns metrics data in Prometheus exposition format.
    """
    try:
        # Serialize and return all Prometheus metrics collected in this process
        return Response(generate_latest(), media_type=CONTENT_TYPE_LATEST)

    except Exception as e:
        logger.error("Failed to generate metrics", exc_info=True)
        raise HTTPException(status_code=500, detail=str(e))


@app.get(
    "/health",
    operation_id="get_health",
    tags=["Monitoring"],

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…