For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inTry it free
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
  • Get started
    • Overview
    • Onboarding
    • Get started
    • Launch Insights
    • LaunchDarkly architecture
    • LaunchDarkly vocabulary
  • AgentControl
    • AgentControl
    • Manage AgentControl
  • Feature flags
    • Create flags
    • Target with flags
    • Flag templates
    • Manage flags
    • Code references
    • Contexts
    • Segments
  • Releases
    • Releasing features with LaunchDarkly
    • Release policies
    • Percentage rollouts
    • Progressive rollouts
    • Guarded rollouts
    • Feature monitoring
    • Release pipelines
    • Engineering insights
    • Release management tools
    • Applications and app versions
    • Change history
    • Restoring previous flag versions
  • Observability
    • Observability
    • Session replay
    • Error monitoring
    • Logs
    • Traces
    • Observability metrics
    • Product analytics events
    • LLM observability
    • Alerts
    • Dashboards
    • Service map
    • Vega for auto-remediation
    • Observability MCP server
    • Search specification
    • Observability settings
    • Observability integrations
      • AWS CloudWatch Metrics
      • AWS FireLens
      • Azure Monitor
      • Datadog Agent ingestion
      • Fluent Bit
      • Syslog log drain
      • Vercel
  • Experimentation
    • Experimentation
    • Experiment metric types
    • Experiment configuration
    • Managing experiments
    • Analyzing experiments
    • Multi-armed bandits
    • Holdouts
  • Metrics and events
    • Metrics in LaunchDarkly
    • Creating metrics
    • Metric groups
    • Events
    • Autogenerated metrics
  • Warehouse native
    • Warehouse native metrics
    • Setting up external warehouses
    • Creating experiments using warehouse native metrics
  • Infrastructure
    • Connect apps and services to LaunchDarkly
    • LaunchDarkly in China and Pakistan
    • LaunchDarkly in the European Union (EU)
    • LaunchDarkly in federal environments
    • Public IP list
  • Your account
    • Projects
    • Views
    • Environments
    • Tags
    • Teams
    • Members
    • Roles
    • Account security
    • Feature previews
    • Billing and usage
    • Changelog
Sign inTry it free
LogoLogo
On this page
  • Overview
  • Prerequisites
  • Configure the Vercel log drain
  • Verify that logs are being received
  • Search attributes
  • Filtering logs
ObservabilityObservability integrations

Vercel

Was this page helpful?
Previous

Experimentation

Next
Built with
Observability is not available in LaunchDarkly's European Union (EU) instance
To learn more, read LaunchDarkly in the European Union (EU).

Overview

This topic explains how to send logs from Vercel to LaunchDarkly’s observability features.

If you deploy your applications on Vercel, you can configure a log drain to automatically forward your server-side logs to LaunchDarkly. This includes build logs, serverless function logs, edge function logs, and static access logs. Once configured, these logs appear in the Logs page of the LaunchDarkly user interface.

Prerequisites

Before you configure the Vercel log drain, you must:

  • Have a Vercel account with at least one project
  • Have LaunchDarkly observability enabled for your project
  • Know your LaunchDarkly client-side ID

To find your client-side ID:

  1. In the LaunchDarkly UI, click the project dropdown to open the project menu.
  2. Select Project settings.
  3. Click Environments.
  4. Find the environment you want to use and copy the Client-side ID value.

Configure the Vercel log drain

You can configure the log drain directly in the Vercel dashboard.

To configure the Vercel log drain:

  1. In Vercel, navigate to your team or account Settings.
  2. Click Log Drains in the sidebar.
  3. Click Add Log Drain.
  4. Select the Projects and Environments you want to collect logs from.
  5. Select Sources to specify which types of logs to send. You can choose from:
    • Build logs
    • Edge function logs
    • Lambda (serverless function) logs
    • Static access logs
  6. For Delivery format, select NDJSON.
  7. For Endpoint, enter https://pub.observability.app.launchdarkly.com/vercel/v1/logs.
  8. Click Add Custom Headers.
  9. Add a header with the name x-highlight-project and set the value to your LaunchDarkly client-side ID.
  10. Click Verify to test the connection.
  11. Click Create Log Drain to save the configuration.

Verify that logs are being received

After you configure the log drain, Vercel begins forwarding logs to LaunchDarkly.

To verify that your logs are being received:

  1. Open the Telemetry section and navigate to the Logs list.
  2. Search for logs with source:vercel or from your Vercel-deployed services.

It may take a few minutes for logs to appear after you first configure the log drain.

Search attributes

Logs from Vercel include the following attributes that you can use when searching:

AttributeDescription
vercel.sourceThe source of the log, such as lambda, edge, build, or static.
vercel.projectIdThe Vercel project ID.
vercel.deploymentIdThe Vercel deployment ID.
vercel.hostThe hostname that served the request.
vercel.pathThe request path.
vercel.statusCodeThe HTTP status code of the response.

To learn more about searching for logs, read Search specification.

Filtering logs

You can configure ingestion filters to control which logs from Vercel are stored in LaunchDarkly. This is useful for excluding noisy logs or limiting ingestion to stay within your observability quotas.

To learn more, read Filters.