Metrics
Metrics is the performance and health view for a project: how many requests it served, how many errored, how fast it responded, and how much bandwidth it moved. Metrics are captured server-side by the PandaStack gateway — there is no client SDK to install and no code change to your app.
How metrics are captured
Section titled “How metrics are captured”- Every request that reaches a project is logged by the gateway / Kong / proxy into ClickHouse
(the
pandastack.request_eventstable). Your application does nothing. - Metrics are per-project. Before any ClickHouse query runs, the project is resolved and ownership-checked in Postgres, and the ClickHouse query is filtered by the resolved project name — so you can only ever read metrics for projects your organization owns.
- Metrics fail open. If ClickHouse is not configured or is unreachable, every endpoint returns an
empty shape with
enabled: falserather than throwing. Treatenabled: falseas “no data source”, not “zero traffic”.
Time ranges
Section titled “Time ranges”Every metrics query takes a range, each with a matching bucket width for time-series data:
range | Window | Bucket width |
|---|---|---|
1h | 1 hour | Per-minute |
24h | 24 hours | 10-minute |
7d | 7 days | Hourly |
30d | 30 days | 6-hour |
The default range is 24h.
The summary
Section titled “The summary”The metrics summary reports headline numbers for the selected range:
| Field | Meaning |
|---|---|
requests | Total requests served. |
errors | Requests with status ≥ 500. |
error_rate | Error percentage (0–100). |
latency_ms.p50 / p95 / p99 | Latency percentiles (computed with quantileTDigest over latency_ms). |
latency_ms.avg | Average latency (ms). |
bandwidth_bytes | Total bytes out (sum of bytes_out). |
unique_visitors | Distinct visitors (uniqExact over visitor_hash). |
rps | Requests per second. |
enabled | false when ClickHouse is unavailable. |
Time series
Section titled “Time series”The time-series endpoint returns one point per bucket for the range. Values are densified onto a fixed grid so charts render cleanly:
- Counts (
requests,errors,bytes_out) zero-fill empty buckets, so the area chart draws down to the baseline. p95latency null-fills empty buckets, so the line bridges gaps instead of dropping to zero.
Each MetricsPoint has a bucket timestamp t plus requests, errors, p95, and bytes_out
(each nullable).
Breakdowns
Section titled “Breakdowns”The breakdown endpoint slices traffic for the range:
| Breakdown | Fields |
|---|---|
| Top paths | path, requests, and per-path p95 latency. |
| Status codes | status, requests. |
| Top countries | country, requests. |
Project list sparklines
Section titled “Project list sparklines”The projects list shows a small 24-hour request sparkline per project. These are produced by a
single batched, hourly ClickHouse query across all of the organization’s projects at once — each
sparkline reports a 24h request total plus per-hour requests and errors points.
Metrics vs. Analytics
Section titled “Metrics vs. Analytics”Metrics answers “how is this service performing?”. Analytics answers “who is visiting?”. Both read from the same ClickHouse event log, captured the same server-side way, but they surface different dimensions and have different gating. If you want visitor geography, referrers, browsers, and devices, see Analytics.
Related
Section titled “Related”- Analytics — the audience-insight sibling of Metrics.
- Uptime monitors — active URL checks and alerts.
- Metrics & analytics API reference — endpoints and schemas.