Vercel
One-click observability for Vercel — auto-configured env vars, Log Drain for Function and Edge logs, full SDK support for Next.js.
Vercel
The Vercel integration gives you observability with zero configuration. Install from the marketplace and every project gets instrumented automatically.
What you get
| Signal | Source | Code changes? |
|---|---|---|
| Function logs | Log Drain (automatic) | No |
| Edge logs | Log Drain (automatic) | No |
| Build logs | Log Drain (automatic) | No |
| HTTP traces | SDK | 1 line |
| Custom spans | SDK | 1 line |
| Runtime metrics | SDK | 1 line |
| Web Vitals | Browser SDK | 1 line |
Step 1: Install the integration
Go to the Obtrace integration on Vercel Marketplace and click Add Integration.
The integration will:
- Authenticate via OAuth
- Provision an Obtrace project for your team
- Inject environment variables into all your Vercel projects:
OBTRACE_API_KEYOBTRACE_PLATFORM=vercelOBTRACE_AUTO_INSTRUMENT=true
- Configure a Log Drain that streams all Function, Edge, Static, and Build logs to Obtrace
After installation, redeploy any project and its logs will start flowing immediately.
Step 2: Add the SDK (optional, for traces + metrics)
Install the SDK:
Next.js (App Router)
Next.js (Route Handler)
Edge Functions
Step 3: Add the Browser SDK (optional, for Web Vitals)
What the Log Drain captures
The Vercel Log Drain streams these fields for every log entry:
| Field | Description |
|---|---|
source | lambda, edge, static, build, external |
message | Log message content |
level | info, warn, error |
timestamp | Unix timestamp |
projectId | Vercel project ID |
deploymentId | Deployment that generated the log |
requestId | Request ID for correlation |
host | Request hostname |
path | Request path |
statusCode | HTTP status code |
method | HTTP method |
environment | production, preview, development |
All fields are preserved as attributes on the OTLP log record in Obtrace.
Environment variables injected
| Variable | Value | Purpose |
|---|---|---|
OBTRACE_API_KEY | obt_live_... | Authentication |
OBTRACE_PLATFORM | vercel | Platform detection |
OBTRACE_AUTO_INSTRUMENT | true | Enable auto-instrumentation |