aprender-orchestrate 0.31.2

Sovereign AI orchestration: autonomous agents, ML serving, code analysis, and transpilation pipelines
Documentation
1
2
3
4
5
6
7
8
9
10
11
//! Prometheus metrics endpoint handler.

use axum::{extract::State, http::header, response::IntoResponse};

use super::state::BancoState;

/// GET /api/v1/metrics — Prometheus-compatible metrics.
pub async fn metrics_handler(State(state): State<BancoState>) -> impl IntoResponse {
    let body = state.metrics.render(state.model.is_loaded(), 85);
    ([(header::CONTENT_TYPE, "text/plain; charset=utf-8")], body)
}