Observability
Seeing what your app is doing in production — runtime logs, analytics, Speed Insights, tracing, and exporting everything with Drains.
Once an app is live, you need to see how it behaves: what's erroring, what's slow, who's visiting. Vercel groups these signals under Observability, and because it controls the whole request path — browser to function — the signals are correlated rather than scattered.
Runtime logs
Logs capture everything your functions write (via console.log/error) plus request metadata. View them in the dashboard or from the CLI:
vercel logs <deployment-url> # stream logs
vercel logs <deployment-url> --level error # filter by severityRetention depends on your plan — short on free tiers, longer with Observability Plus (up to 14 consecutive days within a 30-day window). For anything you need to keep beyond that, use a Drain.
Tip: log structured JSON rather than plain strings. Vercel captures console output as-is, so emitting { level, message, requestId, durationMs } makes logs far easier to query and correlate later.
Web Analytics
Privacy-friendly, first-party traffic analytics — page views, top pages, referrers, and visitor attributes like location, OS, and browser. Because data is sent through your own domain, it isn't blocked by ad blockers the way third-party scripts are. Add it with a component:
// app/layout.tsx
import { Analytics } from '@vercel/analytics/react';
// ...
<Analytics />Custom events are available on Pro and Enterprise (Web Analytics Plus adds UTM parameters and longer report windows).
Speed Insights
Real-user performance — Core Web Vitals measured on actual visitors' devices, rather than a synthetic lab score. Add the companion component:
import { SpeedInsights } from '@vercel/speed-insights/next';
// ...
<SpeedInsights />Both Analytics and Speed Insights collect via client-side scripts, so they generate data points (billed per plan) and a little extra edge traffic. You can set a sample rate per project to control cost.
Tracing
A trace is the story of a single request as it moves through Vercel's infrastructure — CDN, middleware, function handler, database call, response. Each step is a span. Vercel can instrument your app automatically (no code changes) once tracing is enabled, letting you see where time goes and pinpoint bottlenecks. Traces follow the OpenTelemetry protocol, so they export cleanly to tools like Datadog APM, Honeycomb, or Grafana Tempo.
Drains
Drains are the way to get observability data out of Vercel and into the tools your team already uses. A drain streams one data type to a destination:
- Logs — runtime, build, static, firewall, and function logs.
- Traces — OpenTelemetry (OTLP/HTTP) distributed traces.
- Speed Insights — performance metrics and Web Vitals.
- Web Analytics — page views and custom events.
You can point a drain at a custom HTTP endpoint (an OTLP collector, a self-hosted Elastic, a warehouse like Snowflake) or use a native integration with vendors like Datadog. Logs from traced requests are automatically enriched with traceId and spanId, so you can jump from a log line straight into its trace. Configure drains under Team Settings → Drains. Drains are a Pro and Enterprise feature, billed per GB exported.
Where to look first
When something's wrong in production, the usual path is: check Logs filtered to errors for the failing route, correlate to a trace to see which span is slow or throwing, and watch Speed Insights to confirm whether real users are affected. For traffic anomalies and potential abuse, cross-reference with the firewall view described in Security.