Send Vercel logs to Epok
Vercel Drains (previously called Log Drains; renamed in 2026 when the feature generalized to cover Logs, Traces, Speed Insights, and Analytics) forward observability data to any HTTPS endpoint. Point a Logs drain at Epok and runtime + build + edge logs flow in real time. No code changes, no sidecars, no agents.
Time to first log: ~5 min · Vercel plan: Pro or Enterprise (Hobby plan does not include Drains) · API key: app.getepok.dev → Settings → API Keys
1. Open Team Settings → Drains
From the Vercel dashboard, open your team and go to Settings → Drains → click Add Drain. (Drains live at the Team level, not per-project — one drain can scope across all projects or just the ones you pick.)
2. Choose data type: Logs
You'll see four data types — Logs, Traces, Speed Insights, Web Analytics. Pick Logs.
3. Name + projects + log sources
Give the drain a name (e.g. epok-logs), select which projects feed it (all or specific), and pick which log sources to forward. Vercel splits logs into:
- Lambda — server function invocations (the highest-signal category)
- Edge — edge function invocations (high volume; consider sampling)
- Static — static asset cache events
- Build — deployment build output
- External — logs from external integrations
Starting point: enable Lambda + Build and leave Edge / Static off. Add Edge later with a sampling rule (next step) if you need that detail.
4. Sampling rules (optional)
By default the drain forwards 100% of selected sources. For high-volume Vercel deployments — especially Edge — you can add sampling rules per environment + path prefix. Common patterns:
- Launch monitoring: 100% sample of
productionfor a feature launch week, drop to 10% after. - Static coverage: 5% sample of
/docs/*requests so you can catch regressions without paying for full coverage on a low-signal path.
Rules evaluate top-down. Requests not matching any rule are dropped — so if you add a rule, add a catch-all after the specific ones (empty path prefix, 100%) to keep the default-forward behavior.
5. Configure destination → Custom Endpoint
In the destination sidebar pick Custom Endpoint and fill in:
x-vercel-signature today but you can rotate the secret later without re-creating the drain.Replace epk_REPLACE_ME with your real key from Settings → API Keys.
6. Click Create Drain
Vercel sends a one-time test POST to verify the endpoint before activating. If the test returns non-200, the drain won't activate — double-check the Authorization header. On success the drain immediately starts forwarding. You can re-test any time with the Testbutton on the drain's row in the Drains list.
7. (Recommended) Map Vercel's log shape to Epok's
Vercel sends each log entry with structured fields: level, message, source, projectName, deploymentId, statusCode, requestId, traceId (auto-correlated when Tracing is enabled). Epok ingests these as-is and recognizes level and message automatically.
To use projectName as the service identifier in Live Tail, add a Field Mapping under Settings → Detection → Field Mappings pointing service_fields at projectName.
Verify
- Hit any deployed Vercel route once.
- Open app.getepok.dev → Live Tail. Vercel batches drain deliveries every few seconds, so within ~30 s you'll see entries with
projectName,source, andlevelpopulated. - Deploy something that emits a
console.error/ runtime exception. New Errors surfaces the fingerprinted pattern within a few minutes.
Common gotchas
- Hobby plan.Vercel restricts Drains to Pro and Enterprise. If you're on Hobby, instrument your functions to POST to Epok directly via the Node / Python integration code instead — or upgrade to Pro.
- Drains pricing. Pro/Enterprise drain forwarding is billed per delivered volume unit (
$0.50/unit as of mid-2026). Sampling rules are the simplest cost lever — drop Edge / Static to 1–5% if you're hitting unexpected drain bills. - Edge function logs are noisy. Vercel Edge runs close to the user, so one page view can produce many log entries (cache lookups, region info, etc). Either exclude Edge from the drain source list or sample it at 1–5% from the sampling-rules step.
- Auto-pause on persistent failure.Vercel emails you and flags the drain as errored when >80% of deliveries fail in the last hour OR more than 50 failures accumulate. Watch your inbox for
vercel.comsender during the first day.
Logs flowing? Next step: wire up notification channels so alerts reach Slack, PagerDuty, or email.