Skip to main content

Real-time Metrics Export

The MetricsExporter provides per-agent metrics in Prometheus, JSON, and real-time streaming formats.

Setup

REST Endpoints

Available Metrics

  • runs — total agent runs
  • errors — total errors
  • avgDurationMs — average run duration
  • p95DurationMs — 95th percentile latency
  • totalCost — accumulated USD cost
  • totalTokens — total tokens consumed
  • toolCallCount — total tool invocations
  • toolUsageFrequency — per-tool call counts
  • errorRate — error ratio
  • tokensPerRun — average tokens per successful run
  • providerMetrics — raw usage data from the last model API response (per-run record)

Prometheus Format