Documentation

Analytics

Review latency, token usage, and execution trends.

Overview

The Analytics view aggregates trace data across all projects and environments into summary metrics, time-series charts, and breakdowns. Data is fetched from the GET /analytics endpoint, which returns a pre-computed response including summary stats, hourly chart points, and dimension breakdowns.

Summary Metrics

The summary section displays eight key metrics computed from all available traces:

MetricDescriptionSource
Total tracesCount of all trace documentscollection.count_documents()
Success ratePercentage of traces with status successtraces with status == success / total
Average latencyMean wall-clock time across all tracessum(latencies) / total
P95 latency95th percentile latencySorted latencies, 95th percentile index
Total token usageSum of token_count across all tracessum(trace.token_count)
Failed tracesCount of traces with status failedcount where status == failed
Warning tracesCount of traces with status warningcount where status == warning
Slow requestsCount of traces with latency >= 1500mscount where slow_request == true

Time-Series Charts

Traces from the last 24 hours are bucketed by hour. Each bucket provides three data points per hourly window:

  • Average latency — mean of all trace latencies in that hour
  • Token usage — sum of token counts in that hour
  • Trace count — number of traces recorded in that hour

Buckets are computed by grouping traces on their created_at field formatted to HH:00. Traces older than 24 hours are excluded from the chart data.

Breakdowns

The analytics endpoint returns four breakdown dimensions:

BreakdownKey UsedExample
Status breakdowntrace.statussuccess: 42, failed: 3, warning: 5
Model breakdowntrace.model_name or unknowngpt-4o: 20, gpt-4.1-mini: 30
Project breakdowntrace.project_name or project_iddefault: 40, search-service: 10

Info

Breakdowns are sorted by count (most common first). The API processes up to 5000 documents to compute analytics. For larger datasets, filter by project or time range.

Recent Failures

The analytics view also surfaces the five most recent traces that have issues — failed traces, warning traces, slow requests, or traces with retries. This provides a quick overview of system health without navigating to the Failures view.