[view as .md]

Analytics & Logs

Modelux captures every request in ClickHouse for fast analytics and keeps a full decision trace so you can answer “why did this request go to that model” for anything in your history.

Request logs

Every request gets a log entry with:

  • Timestamp, model, provider, project
  • Input and output (tokens + optional full content based on retention config)
  • Cost — input cost, output cost, total, in USD
  • Latency — time-to-first-token and total latency
  • Status — 2xx/4xx/5xx with error class on failures
  • Decision trace — attempts, reasons, per-attempt metrics
  • Tags — whatever custom tags you attached to the request

Browse logs in the dashboard or query via the management API. Logs are searchable by tag, user, project, status, latency threshold, and time range.

Analytics

The analytics page aggregates logs into:

  • Volume — requests over time, stacked by model or provider
  • Cost — total cost over time, broken down by model/provider/project/tag
  • Latency — p50/p95/p99 percentiles per model
  • Error rates — grouped by error class and provider
  • End users — top users by spend, volume, latency
  • Forecasts — projected monthly spend with period-over-period comparison

Filters: date range, project, model, provider, status, tags.

Decision traces

A decision trace answers: what routing strategy ran, which attempts were tried, why they succeeded or failed, and what was chosen.

Example:

config:    @production (v4)
strategy:  fallback

attempt_1  claude-haiku-4-5   timeout (2000ms)
attempt_2  gpt-4o-mini        200 OK

decision:  fallback → attempt_2
reason:    primary timeout, secondary healthy

Click any request in the dashboard to see the full trace.

Log retention

Retention varies by tier: 7 days (Free), 30 days (Pro), 60 days (Team), 90+ days (Enterprise, configurable). Structured analytics are retained longer than raw request/response payloads.