Vercel observability and monitoring

Vercel’s observability stack is divided into three product surfaces: Observability (built-in to every plan — metrics, request counts, error rates, top routes), Observability Plus (Pro/Enterprise add-on — extended retention, per-path latency, Monitoring queries, custom dashboards), and Speed Insights / Web Vitals (frontend user-experience metrics from real users — Core Web Vitals, INP, CLS). On top of these, Runtime Logs show stdout/stderr from Functions; OpenTelemetry integration exports traces to external backends (Sentry, Datadog, Honeycomb, New Relic); LogDrains stream logs to your preferred destination; Spend Management caps runaway costs. All are first-class metric-shipping options for production debugging without forcing you to leave the Vercel dashboard.

See also

1. Observability tab — the main dashboard

Per vercel.com/docs/observability. Available on all plans. Five sections:

SectionWhat it showsPlan
Vercel FunctionsInvocations, error rate, duration, top routes by errors/latencyAll
External APIsOutbound calls from Functions, latency to third partiesAll
Edge RequestsTotal CDN requests, cache hit ratioAll
MiddlewareMiddleware invocations + latencyAll
Fast Data TransferBandwidth out of CDNAll
Image OptimizationSource images processed, cache hit ratioAll
ISRRegeneration count, stale hit ratioAll
BlobBlob storage usage + opsTeam-level
Build DiagnosticsBuild duration, cache hit rate, failed buildsAll (project)
AI GatewayPer-provider spend, latency, model usageAll
QueuesQueue depth, processing rate (when queues GA)Project
External RewritesLatency of upstream rewritesAll
MicrofrontendsPer-frontend metricsAll

Default retention: 24 hours on Hobby, 7 days on Pro, 30 days on Enterprise. Observability Plus extends retention to 30/90 days.

2. Observability Plus

Per vercel.com/docs/observability/observability-plus. Paid add-on for Pro+ (~$10/seat/month flat or usage-based). Adds:

  • 30-90 day retention vs 7 days.
  • Per-path latency breakdown (not just per-function).
  • Granular time ranges down to 1-minute buckets.
  • Monitoring — query interface with custom dashboards, alerts.
  • Higher limits on logged events and metric points.

Monitoring uses a SQL-like query language over a metric dataset:

SELECT path, p95(duration_ms), count() 
FROM functions 
WHERE timestamp > NOW() - INTERVAL 24 HOUR 
  AND status >= 500
GROUP BY path 
ORDER BY count() DESC 
LIMIT 10

3. Speed Insights and Web Vitals

Per vercel.com/docs/speed-insights. Real-user monitoring (RUM) for frontend performance. Tracks Core Web Vitals:

  • LCP (Largest Contentful Paint) — should be < 2.5s
  • INP (Interaction to Next Paint, replaced FID in 2024) — should be < 200ms
  • CLS (Cumulative Layout Shift) — should be < 0.1
  • FCP (First Contentful Paint)
  • TTFB (Time to First Byte)

Setup is one component for Next.js:

// app/layout.tsx
import { SpeedInsights } from "@vercel/speed-insights/next";
 
export default function RootLayout({ children }) {
  return (
    <html>
      <body>
        {children}
        <SpeedInsights />
      </body>
    </html>
  );
}

Other frameworks: @vercel/speed-insights/{react, svelte, vue, nuxt}.

Pricing: Hobby 10k events/month; Pro 25k included.

4. Web Analytics (privacy-focused)

Per vercel.com/docs/analytics. Separate from Speed Insights — privacy-focused page-view tracker that doesn’t use cookies or browser fingerprinting. Aggregates anonymized data on visit counts, top pages, referrers, device types.

import { Analytics } from "@vercel/analytics/next";
 
export default function RootLayout({ children }) {
  return <html><body>{children}<Analytics /></body></html>;
}

Different from Google Analytics — no individual user tracking. Comparable to Plausible / Fathom. Hobby 2.5k events/month; Pro 25k events/month.

5. Runtime Logs

Per vercel.com/docs/runtime-logs. Stdout/stderr from Functions, accessible via:

  • Dashboard (Project → Logs)
  • CLI: vercel logs <deployment-url>
  • LogDrains (HTTP webhook of streaming logs to your backend)
vercel logs --follow                            # tail live
vercel logs <url>                               # all logs for a deployment
vercel logs <url> --json | jq 'select(.level == "error")'
vercel logs <url> --since 1h

Logs structure (JSON Lines):

{
  "level": "info",
  "timestamp": "2026-05-25T18:42:11.456Z",
  "message": "Request handled",
  "requestId": "abc-123",
  "deploymentId": "dpl_xyz",
  "vercel-execution-id": "fxn_abc",
  "region": "iad1",
  "duration": 245,
  "memory_max": 512
}

Retention: 1 day (Hobby), 7 days (Pro), 30 days (Enterprise).

6. LogDrains — stream logs externally

Per vercel.com/docs/log-drains. Configure a webhook that Vercel POSTs structured logs to in near-real-time. Send to:

  • Your own ingestion endpoint
  • Datadog, New Relic, Splunk, Sumo Logic (Marketplace integrations)
  • Logflare, BetterStack, Axiom
# Create via API
curl -X POST "https://api.vercel.com/v1/log-drains" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "name": "datadog",
    "url": "https://http-intake.logs.datadoghq.com/api/v2/logs?...",
    "deliveryFormat": "ndjson",
    "sources": ["edge", "static", "external", "build", "lambda"]
  }'

Pro/Enterprise plans. Counts against your data-transfer budget on the destination side.

7. OpenTelemetry tracing

Per vercel.com/docs/observability/otel-collector. Vercel auto-emits OpenTelemetry spans from Functions, Middleware, and the AI SDK. Configure where they go:

7.1 Vercel-native (just enable OTel in dashboard)

Spans flow into Vercel’s observability backend automatically — visible in the Monitoring view with span details.

7.2 External exporter

Set env vars to ship spans to your OTel collector:

OTEL_EXPORTER_OTLP_ENDPOINT=https://otlp.your-collector.com
OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer xxx"

The AI SDK automatically tags spans with function.id, gen_ai.system, gen_ai.model.name, gen_ai.usage.input_tokens, gen_ai.usage.output_tokens, gen_ai.usage.cost.

For Next.js, add the @vercel/otel package:

// instrumentation.ts
import { registerOTel } from "@vercel/otel";
 
export function register() {
  registerOTel({ serviceName: "my-app" });
}

7.3 Integrations

Vercel Marketplace ships first-party OTel integrations with:

  • Sentry — error tracking + performance
  • Datadog — APM + logs + metrics
  • Honeycomb — distributed tracing
  • Better Stack — uptime + logs
  • Axiom — log analytics
  • Highlight.io — session replay + errors

Install via vercel install <integration>. Auto-configures env vars and OTel endpoint.

8. Notebooks

Per vercel.com/docs/notebooks. Save and share Observability queries:

[Notebook: "API Health Dashboard"]
- Query 1: Error rate by route (last 24h)
- Query 2: P95 latency by region (last 7d)
- Query 3: Token spend per AI Gateway model (last 30d)

Share with team. Useful for runbook automation — operator opens the notebook when an incident starts, sees pre-built diagnostics queries.

9. Monitoring with custom queries

Per vercel.com/docs/observability/monitoring. The query language supports:

-- Find slow API routes
SELECT path, p95(duration), count()
FROM lambda_logs
WHERE timestamp > now() - 1h
  AND status_code >= 200
GROUP BY path
ORDER BY p95(duration) DESC
LIMIT 20
 
-- AI Gateway: track per-model spend
SELECT model, sum(cost_usd), count(), avg(latency_ms)
FROM ai_gateway_logs
WHERE timestamp > now() - 7d
GROUP BY model
ORDER BY sum(cost_usd) DESC
 
-- Top 5xx errors by deployment
SELECT deployment_id, count(), max(timestamp)
FROM lambda_logs
WHERE status_code >= 500
  AND timestamp > now() - 1d
GROUP BY deployment_id

Set up alerts on a query: notify Slack / PagerDuty / webhook when a threshold is crossed (e.g. error rate > 1%, P95 latency > 2s).

10. Spend Management

Per vercel.com/docs/billing/spend-management. Hard caps to prevent runaway costs:

Spend caps configured per project:
  - Hard cap: \$100 / month
  - Soft alert at: \$50 / month

When the hard cap is hit, functions return 402 Payment Required. The frontend continues serving static assets, so the site doesn’t go dark — just becomes read-only.

Use for:

  • Development projects (cap at $10 to learn from mistakes cheaply)
  • Side projects (cap at expected max + buffer)
  • New AI features (LLM costs are unpredictable — cap before launch)

11. Alerting

Per vercel.com/docs/observability/monitoring/alerts. Alerts can fire on:

  • Error rate thresholds
  • Latency P95/P99 thresholds
  • Function failure thresholds
  • AI Gateway cost thresholds
  • Custom Monitoring queries

Channels: email, Slack, webhook, PagerDuty. Configure in Project → Settings → Alerts.

12. Integration with external APMs

For teams already on Datadog / New Relic / Sentry, install the integration from Marketplace:

vercel install datadog        # Datadog
vercel install sentry         # Sentry
vercel install newrelic       # New Relic

Each integration:

  • Installs the agent in your build.
  • Sets the required env vars.
  • Streams logs + metrics + traces to the third-party.
  • Optionally pulls cost data back into Vercel.

13. Build observability

Per vercel.com/docs/observability/insights#build-diagnostics. Tracks:

  • Build duration trends
  • Cache hit rate
  • Bundle size growth
  • Failed builds (with logs)

Useful for catching gradual build regressions before they become problematic.

14. Pricing summary

FeatureHobbyProEnterprise
Observability (basic)Yes, 24h retentionYes, 7dYes, 30d
Observability PlusNoAdd-on (~$10/seat/mo)Included
Speed Insights10k events/mo25k includedCustom
Web Analytics2.5k events/mo25k includedCustom
Runtime Logs1d retention7d30d
LogDrainsNoYesYes
Monitoring (custom queries)NoYes (Observability Plus)Yes
OpenTelemetryYesYesYes
Spend ManagementYesYesYes

15. Observability gotchas

  • Edge Request counts include cache hits — a static asset served from cache still counts as an Edge Request. The metric is “requests entering the CDN”, not “requests reaching origin”. Important for understanding traffic-based pricing.
  • Function logs from Edge runtime are aggressively buffered — sometimes you don’t see a log line for 30-60 seconds in the dashboard. Use --follow on CLI for near-real-time. Or use LogDrains.
  • AI Gateway spend tracking is delayed — provider billing data syncs hourly to Vercel. Your Observability AI Gateway dashboard can lag spend by up to 2 hours.
  • OTel context propagation doesn’t auto-flow into Next.js Server Actions — manually pass traceparent headers if you need full distributed tracing across boundaries.
  • Sampling — Observability Plus samples high-volume events. For statistically representative metrics this is fine, but to find every error you need LogDrains + your own ingestion.

Further reading