Vercel
Connect your Vercel account so Sazabi can create and manage log, trace, and Web Analytics drains for the projects you select.
About
Vercel Drains push logs, OpenTelemetry traces, and Web Analytics events from your projects to Sazabi. Connecting your Vercel account lets Sazabi create and maintain drains for the projects and drain types you select. Sazabi generates a per-stream signing secret for each drain it provisions.
Vercel also has a Send to an endpoint path where you create a log drain yourself in your Vercel dashboard. See Vercel endpoint page for that setup, which covers logs only.
Vercel Drains require the Pro or Enterprise plan. Hobby and Pro Trial teams cannot create drains.
Prerequisites
- A Vercel team on the Pro or Enterprise plan.
- A full-access API token created from your Vercel account settings. For team accounts, create the token while scoped to the team you want to connect — the token inherits your account permissions within that team's scope.
- Web Analytics must be enabled in Vercel for any project where you create an analytics drain.
Set up in the dashboard
Create a Vercel API token
Go to your Vercel account settings and create a full-access API token. If you are connecting a team, scope the token to that team before creating it.
Connect in Sazabi
Go to Settings > Log streams, click Add source, and select Vercel. Enter your Vercel API token and click Connect. Sazabi validates the token and identifies the associated team.
Add log streams
After the connection is confirmed, click Add log stream to open the project picker. The picker has three tabs:
- Logs — deployment logs from all Vercel log sources (Static, Lambda, Edge, Build, External, Firewall, Redirect). Drain format is set to JSON automatically.
- Traces — OpenTelemetry spans from serverless and edge functions.
- Analytics — Web Analytics visitor events from projects with Web Analytics enabled.
Select the projects and drain types you want to forward. Sazabi creates a separate drain for each project/type combination.
Set up with the CLI
You can also connect the Vercel log source with the Sazabi CLI (installed and authenticated — see CLI reference).
Create a managed connection by passing your API token as metadata:
sazabi log-sources create vercel --mode managed \
--metadata '{"vercelApiToken":"'"$VERCEL_API_TOKEN"'"}'To connect a Vercel team rather than your personal scope, add "vercelTeamId":"<team ID>" to the metadata and scope the token to that team. Sazabi validates the token against the Vercel API and creates the log source; note the log source ID it prints.
Add a log stream — one per Vercel project — with sazabi log-streams create, passing the project ID and name plus a drainType of logs, traces, or analytics in --config:
sazabi log-streams create --log-source-id <log-source-id> \
--config '{"vercelProjectId":"<your Vercel project ID>","vercelProjectName":"<project name>","drainType":"logs"}'Run sazabi log-sources list to confirm the source and its streams.
Verify
Push a deployment to a connected project or send traffic to one of its routes.
Open the Intake page in the Sazabi dashboard and confirm that records attributed to the Vercel source appear. Logs typically arrive within one to two minutes of Vercel delivering the drain payload.
Troubleshooting
"Vercel Drains require the Pro or Enterprise plan" — Drains require the Pro or Enterprise plan on every setup path. Upgrade your Vercel team to use them.
Token validation fails — Confirm the token is full-access and was created while scoped to the correct team. Tokens created without a team scope may not have access to team projects.
Analytics drain shows no data — Web Analytics must be enabled in Vercel for the specific project. Check Project Settings > Analytics in Vercel and enable Web Analytics there.
Traces and Web Analytics require account connection — The send-to-an-endpoint path covers logs only. Traces and Web Analytics drains are available only through the connect-your-account path.
Logs stop arriving — The drain may have been deleted in Vercel, or the API token may have been revoked. Remove and re-add the log stream from Settings > Log streams in Sazabi to reprovision the drain.