Monitoring

/docs/monitoring/

The daemon can expose an OpenMetrics (Prometheus) endpoint:

cargo run --release -p choreo-daemon -- --metrics-addr 127.0.0.1:9464

When --metrics-addr is provided, a dedicated HTTP thread serves GET /metrics at the given address. Without the flag, no metrics server is started.

Metrics

MetricTypeLabelsDescription
choreo_sessions_activeGaugeActive sessions
choreo_connections_activeGaugeActive client connections
choreo_requests_totalCounterstatusRequests processed
choreo_tool_executions_totalCountertool, statusTool call count
choreo_api_calls_totalCountermodel, endpointAPI call count
choreo_api_errors_totalCountermodel, error_typeAPI error breakdown
choreo_connections_totalCounterTotal connections accepted
choreo_turns_totalCountermodelAgent loop turns
choreo_request_duration_secondsHistogramstatusRequest latency
choreo_tool_execution_duration_secondsHistogramtoolPer-tool execution time
choreo_api_call_duration_secondsHistogrammodel, endpointAPI round-trip time

Process-level metrics (RSS, CPU, FD count) are also exposed via the prometheus crate's process feature.

All operations are atomic (no locks), and a dedicated thread serves the endpoint via tiny_http, polling the shutdown flag every second.