Set up Vercel Log drain

Configure a Vercel Log drain to have greater control over which types of logs will be set to Better Stack.

Don't need to customize which logs are sent to Better Stack?

Use simpler automatic Vercel Better Stack integration.

Vercel Pro or Enterprise plan is required

Start logging in 3 minutes

Create a new source

Create a new HTTP source in Better Stack Logs.

Configure Vercel to forward logs

Configure a Log drain to send your logs to Better Stack:

  1. Go to Vercel dashboardTeam SettingsLog Drains.
  2. Select sources to collect logs from.
  3. Choose NDJSON as your delivery format.
  4. Choose your target projects.
  5. Enter https://in.logs.betterstack.com as your endpoint URL.
    The Vercel's form might instruct you about domain verification, but the step should be optional for Better Stack URLs and you should be able to just confirm it without doing anything special.
  6. Add Authorization header with the value Bearer $SOURCE_TOKEN. Replace $SOURCE_TOKEN with your source token.
    You can get your source tokens in Sources → Configure.
  7. Click the Add Log Drain button and you're done.

You should see your logs in Better Stack → Live tail.

Not seeing any logs?

Click the Test Log Drain button in Vercel to send a sample log.
You should see the log in Live tail.

Need help?

Please let us know at hello@betterstack.com.
We're happy to help! 🙏