Skip to content

Metrics

Project sidebar → Metrics opens the per-project metrics page. Same data backbone as the Dashboard (gateway_logs), filtered to the active project.

Four cards at the top:

KPIWindow
RequestsLast 24h, with 7d hint
TokensLast 24h, with 30d hint
Avg LatencyLast 24h
Error RateLast 24h

Two side-by-side area charts:

  • Requests / day (30d) — daily request count, segmented by provider.
  • Tokens / day (30d) — daily token total, segmented by provider.

Plus a latency histogram (p50, p95, p99) over the same window.

Stacked bar showing the share of traffic per provider over the last 24h.

Top 5 endpoints in this project by request count, with status / latency / token counts. Click an endpoint to jump to its detail page.

Last 50 entries from audit_logs filtered to this project.

A small time-range picker at the top of the page lets you switch between 24h / 7d / 30d. The charts and KPIs update accordingly.

MetricsController::index runs ~6 queries against gateway_logs filtered by project_id plus the time window. None of them are in real time — pages render in 50–200ms typically. If your gateway_logs is huge, see Database Setup → Tuning for index hints.

  • Dashboard: gateway-wide, includes all projects.
  • Metrics: scoped to one project.

Use metrics when you’re investigating a specific project’s behaviour.

  • ❌ Per-endpoint sparklines on the metrics page itself (you have to click into the endpoint).
  • ❌ Custom dashboards.
  • ❌ Alerting (use webhooks for that — fire on gateway_log.error or audit events).

For Prometheus / Grafana style dashboards, you can pull the data directly from gateway_logs via SQL or via a small adapter.


Next: Live Logs.


© Akyros Labs LLC. All rights reserved.