Skip to content

Observability

PRX provides comprehensive observability through metrics, distributed tracing, and structured logging. These features enable monitoring, debugging, and performance optimization of agent operations.

Overview

FeatureBackendPurpose
Prometheus MetricsPrometheusQuantitative monitoring (request rates, latencies, errors)
OpenTelemetryOTLP-compatibleDistributed tracing and span-level analysis
Structured Loggingstdout/fileDetailed operational logs

Quick Start

Enable observability in config.toml:

toml
[observability]
log_level = "info"
log_format = "json"  # "json" | "pretty"

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

[observability.tracing]
enabled = false
endpoint = "http://localhost:4317"

Key Metrics

PRX exposes metrics for:

  • Agent performance -- session duration, turns per session, tool calls
  • LLM provider -- request latency, token usage, error rates, cost
  • Memory -- recall latency, store size, compaction frequency
  • System -- CPU usage, memory consumption, active connections

Released under the Apache-2.0 License.