For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/integrations/vercel.md. A documentation index is available at /llms.txt.

Vercel

Supported OS Linux Windows Mac OS

To find out if this integration is available in your organization, see your Datadog Integrations page or ask your organization administrator.

To initiate an exception request to enable this integration for your organization, email support@ddog-gov.com.

datadog-integration

Overview

Vercel is a deployment and collaboration platform that enables frontend developers to build high-performance websites and applications. Vercel is also the creator of Next.js, a React framework developed in collaboration with engineers at Google and Facebook in 2016. Vercel users can leverage a built-in deployment tool that manages the build and rendering process, as well as a proprietary Edge Network that caches their sites for fast retrieval. Additionally, Vercel offers Serverless Functions, which allow users to deploy serverless code to accomplish essential backend processes like user authentication, form submission, and database queries.

Integrate Vercel with Datadog to:

Setup

The Datadog integration for Vercel is installed from the Vercel Marketplace.

Install Datadog from the Vercel Marketplace

  1. Sign in to Vercel, then open the Datadog listing in the Vercel Marketplace and select Connect Account.

  2. Select the Vercel team in which you want to install the integration.

  3. Select which projects to monitor: either all projects or a specific subset.

  4. Select Connect Account. After Vercel provisions the integration, you are redirected to the Configure Vercel for Serverless page in Datadog.

Configure the integration

On the Configure Vercel for Serverless page, complete the following steps:

  1. Select API Key - Select Create New to create a dedicated key for this integration, or choose an existing API key.

  2. Enable Vercel Log Drain for Log Management - Toggle Log Drain on to forward logs from your Vercel apps to Datadog. Set the sampling percentage (1-100%) for the share of logs to forward.

  3. Set Log Sources - Select which Vercel log sources to forward. At least one is required:

    • Static: CDN and static asset request logs
    • Lambda: Serverless Function execution logs
    • Build: Build output logs
    • Edge: Edge Function and Edge Middleware logs
    • External: Logs from external services routed through Vercel
    • Firewall: Vercel Firewall event logs

    Note: To ensure metrics are collected, Datadog recommends enabling Lambda logs and Static logs. Enabling Build logs is recommended if you want to collect build metrics.

  4. Set Log Environment - Select Production, Preview, or both. At least one is required.

  5. Enable Vercel Trace Drain for APM - Toggle Trace Drain on to forward traces from your Vercel apps to Datadog. Set the sampling percentage (1-100%).

  6. Select Add Integration. The Vercel Integration Setup status page opens and confirms that data is flowing into Datadog. From there you can navigate to the Vercel Monitoring summary, the out-of-the-box dashboard, the Log Explorer, the Trace Explorer, and Real User Monitoring.

Note: Vercel Log Drains and Trace Drains are billed by Vercel. See the Vercel documentation for Log Drains and Trace Drains.

Data Collected

Metrics

vercel.requests
(count)
The number of requests to each route in a Vercel project
Shown as request
vercel.builds.build_count
(count)
The number of builds of a Vercel project
Shown as build
vercel.functions.memorysize
(gauge)
The memory allocated to a Vercel Serverless Function
Shown as mebibyte
vercel.functions.max_memory_used
(gauge)
The max memory used by a Vercel Serverless Function invocation
Shown as mebibyte
vercel.functions.invocations
(count)
The number of invocations of a Vercel Serverless Function
Shown as invocation
vercel.functions.execution
(gauge)
The execution time of a Vercel Serverless Function invocation
Shown as microsecond
vercel.functions.errors
(count)
The number of errors in a Vercel Serverless Function
Shown as error
vercel.functions.duration
(gauge)
The duration of a Vercel Serverless Function invocation
Shown as nanosecond

Service Checks

The Vercel integration does not include any service checks.

Events

The Vercel integration does not include any events.

Logs

The Vercel integration collects logs from your Vercel Project using Vercel’s Log Drains feature.

Traces

The Vercel integration collects traces from your Vercel Project using Vercel’s Trace Drains feature.

Troubleshooting

If you are using the Vercel OpenTelemetry SDK, the serviceName specified in registerOTel block of your initializer must match the Vercel Project name. This enables traces to appear in Datadog with the appropriate logs and metrics.

Need help? Contact Datadog support.