Skip to content

Prometheus Metrics

PRX exposes a Prometheus-compatible metrics endpoint for integration with monitoring systems like Grafana, Datadog, and AlertManager.

Endpoint

When enabled, metrics are available at:

http://127.0.0.1:9090/metrics

Available Metrics

Agent Metrics

MetricTypeDescription
prx_sessions_totalCounterTotal sessions created
prx_sessions_activeGaugeCurrently active sessions
prx_session_duration_secondsHistogramSession duration
prx_turns_totalCounterTotal conversation turns
prx_tool_calls_totalCounterTotal tool calls (by tool name)

LLM Provider Metrics

MetricTypeDescription
prx_llm_requests_totalCounterTotal LLM requests (by provider, model)
prx_llm_request_duration_secondsHistogramLLM request latency
prx_llm_tokens_totalCounterTotal tokens (input/output, by model)
prx_llm_errors_totalCounterLLM errors (by type)
prx_llm_cost_dollarsCounterEstimated cost in USD

System Metrics

MetricTypeDescription
prx_memory_usage_bytesGaugeProcess memory usage
prx_cpu_usage_ratioGaugeProcess CPU usage

Configuration

toml
[observability.metrics]
enabled = true
bind = "127.0.0.1:9090"
path = "/metrics"

Released under the Apache-2.0 License.