> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sazabi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Vercel

> Connect your Vercel account so Sazabi can create and manage log, trace, and Web Analytics drains for the projects you select.

[All Vercel integration capabilities](https://docs.sazabi.com/catalogs/integrations/vercel)

## 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](https://docs.sazabi.com/catalogs/log-sources/send-to-an-endpoint/vercel.md) for that setup, which covers logs only.

> [!WARNING]
>
> 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.
* An API token created from your [Vercel account settings](https://vercel.com/account/tokens), scoped to the team you want to connect, with All Projects selected. A team-scoped token carries only that team's permissions. A Full Account token also works, through one of its teams. A token scoped to a single project can't manage drains, and personal-account projects can't be connected, because drains need a team.
* Web Analytics must be enabled in Vercel for any project where you create an analytics drain.

## Set up in the dashboard

**Step 1**

### Create a Vercel API token

Go to your [Vercel account settings](https://vercel.com/account/tokens) and create an API token. Under **Scope**, select the team you want to connect, then **All Projects**. Selecting a single project creates a project-scoped token, which cannot manage drains.

**Step 2**

### Connect in Sazabi

Go to [**Settings > Log streams**](https://app.sazabi.com/settings/log-source-providers), click **Add source**, and select **Vercel**. Enter your Vercel API token, choose the team to connect, and click **Connect**. A team-scoped token offers only its team; a Full Account token lists every team you belong to.

**Step 3**

### 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](https://docs.sazabi.com/reference/cli.md) (installed and authenticated — see [CLI reference](https://docs.sazabi.com/reference/cli/log-sources.md)).

Create a native connection by passing your API token as metadata:

```bash theme={"system"}
sazabi log-sources create vercel --mode native \
  --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`:

```bash theme={"system"}
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](https://docs.sazabi.com/guides/instrument/intake.md) 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 was created while scoped to the team you are connecting, and that the team is on the Pro or Enterprise plan. A token scoped to another team cannot see this team's projects.

**"This connection has no Vercel team"** — The connection was saved without a team, so Vercel cannot create drains for it. Disconnect and reconnect, choosing the team when prompted.

**"This token is scoped to a single Vercel project"** — Drains are a team-level resource, and Vercel denies team-level requests to project-scoped tokens. Create a new token scoped to the team with **All Projects** selected, then reconnect.

**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**](https://app.sazabi.com/settings/log-source-providers) in Sazabi to reprovision the drain.

## Further reading

> [card] [Intake](https://docs.sazabi.com/guides/instrument/intake.md)
>
> See per-source ingestion volume and health in the Intake page.

> [card] [Vercel (send to an endpoint)](https://docs.sazabi.com/catalogs/log-sources/send-to-an-endpoint/vercel.md)
>
> Create a Vercel log drain yourself and point it at Sazabi (logs only).

> [card] [Log sources](https://docs.sazabi.com/catalogs/log-sources.md)
>
> Browse the full log source catalog.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.