Observability Lab

Logs, traces and metrics, one technique per page, watching a real system in production: the API lab, which runs on Vercel and on Cloudflare Workers over one Postgres database. A sibling of the Vercel, Cloudflare, Motion and API labs. 0 of 7 built so far.

How it's built

  • The system being watched is the API lab: every request writes one structured JSON log line with an id that follows it across services.
  • OpenTelemetry, the vendor-neutral standard, carries logs, traces and metrics out of the code over OTLP.
  • Grafana Cloud (free plan) stores and queries them: Loki for logs, Tempo for traces, Mimir for metrics.
  • These pages send real requests to the API, then show what the telemetry says about them.

Logs

Structured logsOne JSON line per request, searchable by any field.Phase 1
Request IDsOne id that follows a request across services and platforms.Phase 1

Traces

Distributed tracingWhere the time goes: every step of a request as a span.Phase 2

Metrics

RED metricsRate, errors and duration for every endpoint.Phase 3
Dashboards & alertsSeeing trouble at a glance, and being told about it.Phase 3

The browser

Real user monitoringWeb vitals and errors from visitors' own browsers.Phase 4

From outside

Synthetic checksProbing the live API on a schedule, from around the world.Phase 5