> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bronto.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Vercel

> Stream runtime logs, OpenTelemetry traces, Speed Insights, Web Analytics, and audit logs from Vercel into Bronto using Vercel drains.

# Overview

Vercel's [drains](https://vercel.com/docs/drains/using-drains) forward observability data to an external destination in real time. Routing this data into Bronto lets you correlate frontend performance, user behaviour, and backend telemetry in a single place, with long-term retention and unified alerting across your full stack.

| Drain          | What it contains                                                   | Schema reference                                                                    |
| -------------- | ------------------------------------------------------------------ | ----------------------------------------------------------------------------------- |
| Logs           | Runtime, build, edge, and static logs from your Vercel deployments | [Log Drains reference](https://vercel.com/docs/drains/reference/logs)               |
| Traces         | Distributed OpenTelemetry trace spans across your functions        | [Traces reference](https://vercel.com/docs/drains/reference/traces)                 |
| Speed Insights | Core Web Vitals and real user performance metrics                  | [Speed Insights reference](https://vercel.com/docs/drains/reference/speed-insights) |
| Web Analytics  | Visitor events and page view data                                  | [Analytics reference](https://vercel.com/docs/drains/reference/analytics)           |
| Audit Logs     | Team activity events for security and compliance (Enterprise only) | [Audit Log reference](https://vercel.com/docs/drains/reference/audit-logs)          |

This guide walks you through configuring each drain type to send data to Bronto.

## Prerequisites

* A **Vercel Pro or Enterprise** plan for Logs, Traces, Speed Insights, and Web Analytics drains. **Audit Log** drains require an **Enterprise** plan. See [Vercel's drain documentation](https://vercel.com/docs/drains/using-drains) for plan details.
* A **Bronto API key** with at least the **Ingestion** role. See [API Keys](/Account-Management/API-Keys) for instructions on creating one.

***

## Drain Types

Vercel exposes five drain types. Each maps to a Bronto ingestion endpoint and encoding format:

| Drain          | Endpoint URL                                     | Encoding |
| -------------- | ------------------------------------------------ | -------- |
| Logs           | `https://ingestion.<region>.bronto.io/`          | NDJSON   |
| Traces         | `https://ingestion.<region>.bronto.io/v1/traces` | Protobuf |
| Speed Insights | `https://ingestion.<region>.bronto.io/`          | NDJSON   |
| Web Analytics  | `https://ingestion.<region>.bronto.io/`          | NDJSON   |
| Audit Logs     | `https://ingestion.<region>.bronto.io/`          | NDJSON   |

Replace `<region>` with your Bronto account's region — either `eu` or `us`.

All five drain types use the same set of required headers:

| Header                | Value                             |
| --------------------- | --------------------------------- |
| `x-bronto-api-key`    | Your Bronto API key               |
| `x-bronto-dataset`    | The dataset name to write into    |
| `x-bronto-collection` | The collection name to write into |

<Callout type="info">
  **Traces use OTLP/HTTP.** Vercel sends spans as OpenTelemetry protobuf over OTLP/**HTTP** to the `/v1/traces` path; OTLP/gRPC (port 4317) is not supported. Bronto's traces endpoint accepts this directly, so you don't need a collector or proxy. Every span also carries the `vercel.projectId` and `vercel.deploymentId` resource attributes, which you can use to link spans back to the matching logs and performance data — see [Correlate telemetry across drains](#correlate-telemetry-across-drains).
</Callout>

***

## Configure a Drain in Vercel

The steps below apply to all five drain types. Repeat this process for each type you want to enable.

* Navigate to your team settings in Vercel and go to the **Drains** section
* Click **Add Drain** in the top-right corner
* Select the drain type you want to configure (Logs, Traces, Speed Insights, Web Analytics, or Audit Logs)
* Configure the drain name and select which projects should be associated with it

<Callout type="info">
  All data associated with a single drain configuration will be grouped in the same dataset. We recommend creating **separate drains** for different projects and environments.
</Callout>

* For **Logs** drains: select the log sources (`build`, `edge`, `lambda`, `static`, `external`, `firewall`, `redirect`) and environments (e.g., production, preview) you want to include
* For **Audit Log** drains: these apply to the **whole team** — project selection, environment filtering, and sampling are not available, so create a single dedicated drain and dataset for them
* Most customers send all data to Bronto without sampling — Bronto is designed to handle high-volume ingestion. If you need to control Vercel drain costs, add sampling rules; for **Traces**, Vercel supports per-environment and per-path rules (for example, 100% on launch day, then 10% once traffic stabilises, or a steady 5% on static paths)
* Select **Custom Endpoint** and set the URL to the appropriate endpoint from the table above
* Select the encoding format from the table above (**NDJSON** for Logs, Speed Insights, Web Analytics, and Audit Logs; **Protobuf** for Traces)
* Add the three required headers (`x-bronto-api-key`, `x-bronto-dataset`, `x-bronto-collection`)
* Click **Test** — if everything is configured correctly you should see a **200** status response

<Callout type="error">
  If you receive an error, double-check that the endpoint URL is correct for the drain type, the API key has the **Ingestion** role assigned, and all three required headers are present and correctly formatted. If issues persist, contact Bronto Support.
</Callout>

* Click **Create Drain** to finish setup

***

## Verify Data Flow

Once a drain is created, data from the selected projects and environments will begin flowing into Bronto. Navigate to your dataset in Bronto to confirm data is arriving as expected.

***

## Correlate telemetry across drains

With every drain flowing into Bronto, you can look at frontend and backend data side by side instead of switching between tools. The payloads share a few identifiers that make that work:

| Field                                  | Present on                                              | Use it to                                                     |
| -------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------------- |
| `projectId` / `vercel.projectId`       | Logs, Traces, Speed Insights, Web Analytics, Audit Logs | Scope every signal to one Vercel project                      |
| `deploymentId` / `vercel.deploymentId` | Logs, Traces, Speed Insights, Web Analytics, Audit Logs | Compare a deployment before and after a release               |
| `traceId` / `spanId`                   | Logs, Traces                                            | Jump from a log line to its distributed trace and back        |
| `route`                                | Speed Insights, Web Analytics                           | Line up a slow Web Vital with the pages and traffic behind it |

For example, when a **Speed Insights** regression shows up on a route, filter **Logs** and **Traces** by the same `deploymentId` to find the release that introduced it, then use the `traceId` on an error log to open the exact span behind it.

***

## Out-of-the-Box Monitoring with Bronto Express

Once your Vercel drains are flowing into Bronto, you can use **Bronto Express** to instantly provision pre-built dashboards, monitors, and saved searches — no manual setup required.

Bronto Express detects which drain types you have configured and offers only the content that matches your data. If you later add additional drains, re-run Express provisioning to unlock the corresponding dashboards.

<Callout type="info">
  Bronto Express for Vercel is currently in preview and available on request. Please [reach out to support](mailto:support@bronto.io) to enable it for your account.
</Callout>

<Callout type="info">
  Bronto Express currently ships **three** Vercel dashboards — Overview (Logs), Web Vitals (Speed Insights), and Web Analytics — each mapping to a different drain type. You can ship with any subset; a Vercel Express package is considered valid if at least one drain's content is fully provisioned.
</Callout>

<Callout type="info">
  **Traces** and **Audit Logs** are ingested and searchable in Bronto, and they [correlate](#correlate-telemetry-across-drains) with the other drains, but they don't have a dedicated Express dashboard yet. You can build your own on the incoming data in the meantime.
</Callout>

***

### Dashboards

#### Vercel Overview (Logs drain)

A high-level view of request traffic, error rates, cache behaviour, and firewall activity across your Vercel deployments.

<Frame>
  <img src="https://mintcdn.com/bronto/_MCINHz31aea1WG2/images/integrations/assets/images/vercel-overview-dashboard.png?fit=max&auto=format&n=_MCINHz31aea1WG2&q=85&s=1312a36617f0a9ddd0279a63f2bf8eea" width="1930" height="941" data-path="images/integrations/assets/images/vercel-overview-dashboard.png" />
</Frame>

| Widget                   | Type        | What it shows                                             |
| ------------------------ | ----------- | --------------------------------------------------------- |
| Total Requests           | Query Value | Count of all proxied requests                             |
| 5xx Error Count          | Query Value | Count of server error responses                           |
| Lambda Crashes           | Query Value | Fatal-level events and status code –1                     |
| Requests Over Time       | Line        | Proxied request volume over time                          |
| Requests by Source       | Bar         | Breakdown by source (build / edge / lambda / static / …)  |
| HTTP Status Breakdown    | Bar         | Request count grouped by HTTP status code                 |
| Requests by Method       | Bar         | Request count grouped by HTTP method                      |
| Cache State Distribution | Bar         | Breakdown by `proxy.vercelCache` (HIT / MISS / STALE / …) |
| Top Error Paths          | Top List    | Paths with the most 5xx responses                         |
| Top Edge Regions         | Top List    | Most active `executionRegion` values                      |
| Firewall Actions         | Bar         | Request count grouped by WAF action                       |
| Top Denied Clients       | Top List    | Client IPs most frequently denied by the firewall         |
| Build Failures Over Time | Line        | Build-source error log volume over time                   |

***

#### Vercel Web Vitals (Speed Insights drain)

Core Web Vitals at P75, segmented by route and device type, using Google's published "good" thresholds.

<Frame>
  <img src="https://mintcdn.com/bronto/_MCINHz31aea1WG2/images/integrations/assets/images/vercel-web-vitals-dashboard.png?fit=max&auto=format&n=_MCINHz31aea1WG2&q=85&s=a7379f48bfa496ce588d5d94adc3fb37" width="1930" height="941" data-path="images/integrations/assets/images/vercel-web-vitals-dashboard.png" />
</Frame>

| Widget                     | Type        | What it shows                                    |
| -------------------------- | ----------- | ------------------------------------------------ |
| LCP P75                    | Query Value | Largest Contentful Paint at the 75th percentile  |
| INP P75                    | Query Value | Interaction to Next Paint at the 75th percentile |
| CLS P75                    | Query Value | Cumulative Layout Shift at the 75th percentile   |
| TTFB P75                   | Query Value | Time to First Byte at the 75th percentile        |
| Web Vitals Over Time (P75) | Line        | P75 trend for all metric types                   |
| LCP P75 by Route           | Top List    | Slowest routes by LCP P75                        |
| INP P75 by Route           | Top List    | Slowest routes by INP P75                        |
| Device Type Breakdown      | Bar         | Measurement count by device type                 |

***

#### Vercel Web Analytics (Web Analytics drain)

Visitor and engagement data from your Vercel Web Analytics drain.

<Frame>
  <img src="https://mintcdn.com/bronto/_MCINHz31aea1WG2/images/integrations/assets/images/vercel-web-analytics-overview-dashboard.png?fit=max&auto=format&n=_MCINHz31aea1WG2&q=85&s=f202cbaa12b87518867cf991cef94625" width="1930" height="941" data-path="images/integrations/assets/images/vercel-web-analytics-overview-dashboard.png" />
</Frame>

| Widget               | Type     | What it shows                    |
| -------------------- | -------- | -------------------------------- |
| Pageviews Over Time  | Line     | Pageview event volume over time  |
| Top Pages            | Top List | Most visited paths               |
| Top Custom Events    | Top List | Most frequent custom event names |
| Referrer Breakdown   | Bar      | Pageviews grouped by referrer    |
| Country Distribution | Tree Map | Pageviews grouped by country     |
| Device Type          | Bar      | Pageviews grouped by device type |

***

### Monitors

Monitors run continuously against your incoming data and fire alerts when thresholds are crossed. All windows are 5 minutes.

| Monitor              | Drain          | Severity | Threshold                     |
| -------------------- | -------------- | -------- | ----------------------------- |
| Lambda Error Spike   | Logs           | Critical | 10 events                     |
| Lambda Crash         | Logs           | Critical | Any event with status code –1 |
| 5xx Error Rate Spike | Logs           | Critical | 5% of total requests          |
| High 4xx Rate        | Logs           | Warning  | 15% of total requests         |
| Firewall Deny Spike  | Logs           | Warning  | 100 deny events               |
| LCP P75 Regression   | Speed Insights | Warning  | P75 > 2,500 ms                |
| INP P75 Regression   | Speed Insights | Warning  | P75 > 200 ms                  |

<Callout type="info">
  Thresholds for LCP and INP match Google's and Vercel's published "needs improvement" cut-off. You can adjust these in the monitor settings to match your own performance baseline.
</Callout>

***

### Saved Searches

Pre-built filters you can open directly from the search bar or use as a starting point for your own investigations.

| Name            | Drain          | What it finds                                  |
| --------------- | -------------- | ---------------------------------------------- |
| Lambda Errors   | Logs           | Error and fatal log events from lambda sources |
| Lambda Crashes  | Logs           | Events with status code –1 (process crash)     |
| Firewall Denies | Logs           | Requests denied by the Vercel WAF              |
| Build Failures  | Logs           | Error-level events from the build source       |
| Poor LCP Pages  | Speed Insights | LCP measurements above 2,500 ms                |
| Poor INP Pages  | Speed Insights | INP measurements above 200 ms                  |
