VercelVercel
Drains

Working with Drains

Last updated January 7, 2026

Drains are available on Enterprise and Pro plans

Drains let you forward observability data from your applications to external services for debugging, performance optimization, analysis, and alerting, so that you can:

  • Store observability data persistently in your preferred external services
  • Process large volumes of telemetry data using your own tools
  • Set up alerts based on application behavior patterns
  • Build custom metrics and dashboards from your data

You can add Drains in two ways:

Learn how to manage your active drains.

You can drain four types of data:

  • Logs: Runtime, build, and static logs from your deployments (supports custom endpoints and native integrations)
  • Traces: Distributed tracing data in OpenTelemetry format (supports custom endpoints and native integrations)
  • Speed Insights: Performance metrics and web vitals (custom endpoints only)
  • Web Analytics: Page views and custom events (custom endpoints only)

Each drain data type has specific formats, fields, and schemas. Review the reference documentation for logs, traces, speed insights, and analytics to understand the data structure you'll receive from each data type.

When you create or update drains through the REST API, use the schemas property in the request body to specify which data type the drain receives. Each drain handles one data type.

The schemas object maps a schema name to a version object:

{
  schemas: {
    [schemaName: string]: {
      version: string;
    };
  }
}

The following table lists the available schema names:

Schema nameVersionData type
logv1Runtime, build, and static logs
tracev1Distributed tracing data in OpenTelemetry format
analyticsv1Web Analytics page views and custom events
speed_insightsv1Performance metrics and web vitals

For example, to create a log drain, set log as the schema name with version v1:

{
  "schemas": {
    "log": { "version": "v1" }
  }
}

You also use the schemas property when validating drain delivery configuration. Pass the same schemas and delivery values you plan to use when creating the drain to verify your endpoint before the drain is live.

For details on the data each schema delivers, see the reference docs for logs, traces, speed insights, and analytics.

You can secure your drains by checking for valid signatures and hiding IP addresses. Learn how to add security to your drains.

Drains are available to all users on the Pro and Enterprise plans. If you are on the Hobby or Pro Trial plan, you'll need to upgrade to Pro to access drains.

Drains usage is billed based on the pricing table below. Pricing is the same regardless of data type:

ResourcePriceIncluded (Pro)
Drains$0.50 per 1 GBN/A

See Optimizing Drains for information on how to manage costs associated with Drains.

For more information on Drains, check out the following resources:


Was this helpful?

supported.