Menu
Important
Stay updated on React2Shell

Log Drains Reference

Last updated November 24, 2025

Log Drains forward logs from your deployments to external endpoints for storage and analysis. You can configure Log Drains in two ways:

Vercel sends logs to endpoints over HTTPS every time your deployments generate logs. Multiple logs may be batched into a single request when possible to optimize delivery performance. In the dashboard, use Additional configuration for logs to control the sources, environments, and sampling rules described below.

The following table describes the possible fields that are sent via Log Drains:

NameTypeRequiredDescriptionExample
stringYesUnique identifier for the log entry
stringYesIdentifier for the Vercel deployment
enumYesOrigin of the log, , , , , , or
stringYesHostname of the request
numberYesUnix timestamp when the log was generated1573817187330
stringYesIdentifier for the Vercel project
enumYesLog severity level, , , or
stringNoLog message content (may be truncated if over 256 KB)
stringNoIdentifier for the Vercel build (only present on build logs)
stringNoEntrypoint for the request
stringNoOrigin of the external content (only on and logs)
stringNoFunction or dynamic path of the request
stringNoLog output type, , , , , , , , , , ,
numberNoHTTP status code of the request200 ( means no response returned and the lambda crashed)
stringNoIdentifier of the request
enumNoDeployment environment or
stringNoGit branch name
stringNoJA3 fingerprint digest
stringNoJA4 fingerprint digest
enumNoType of edge runtime or
stringNoName of the Vercel project
stringNoRegion where the request is executed
stringNoTrace identifier for distributed tracing
stringNoSpan identifier for distributed tracing
stringNoTrace
stringNoSpan
objectNoContains information about proxy requestsSee proxy fields below
numberYes*Unix timestamp when the proxy request was made1573817250172
stringYes*HTTP method of the request
stringYes*Hostname of the request
stringYes*Request path with query parameters
arrayYes*User agent strings of the request
stringYes*Region where the request is processed
stringNoReferer of the request
numberNoHTTP status code of the proxy request200 ( means revalidation occurred in the background)
stringNoClient IP address
stringNoProtocol of the request
numberNoSize of the response in bytes1024
stringNoOriginal request ID when request is served from cache
stringNoHow the request was served based on its path and project configuration, , , , , , , , , , ,
stringNoVariant of the path type
stringNoVercel-specific identifier
enumNoCache status sent to the browser, , , , ,
stringNoRegion where lambda function executed
enumNoAction taken by firewall rules, , , ,
stringNoID of the firewall rule that matched

*Required when object is present

Vercel supports the following formats for Log Drains. You can configure the format when configuring the Drain destination:

Vercel sends logs as JSON arrays containing log objects:

Vercel sends logs as newline-delimited JSON objects:

When you configure a Log Drain, select which sources to collect in Additional configuration for logs:

valueDetails
Requests to static assets like HTML and CSS files
Output from Vercel Functions like API Routes
Output from Vercel Functions using Edge runtime
Output from the Build Step
External rewrites to a different domain. Includes cached external rewrites
Outputs log data from requests denied by Vercel Firewall rules
Requests that are redirected by redirect rules

Use the same panel to choose which environments send logs to your drain:

valueDetails
Logs from production deployments with assigned domain(s)
Logs from deployments accessed through the generated deployment URL

Sampling rules let you control how much log data each drain receives. Use them to send the right volume of data for observability and cost targets. To add sampling rules:

  1. If no rules exist, click Add sampling rule.
  2. Choose the environment you want to sample from.
  3. Set the sampling percentage.
  4. (Optional) Specify a request path prefix. Leave it blank to apply the rule to every path.

Example workflows:

  • Launch-day monitoring: sample 100% of production traffic when you launch a new feature, then decrease to 10% once traffic stabilizes.
  • Static coverage: always collect 5% from so you can spot regressions on a static documentation site.

Rules run from top to bottom. Requests that match a rule use that rule’s sampling rate, and any other requests are dropped. If you do not add rules, the drain forwards 100% of data to the destination.

For more information on Log Drains and how to use them, check out the following resources:


Was this helpful?

supported.