> For the complete documentation index, see [llms.txt](https://docs.groundcover.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.groundcover.com/collect-data/data-sources/vercel.md).

# Vercel

Send Vercel logs and traces to groundcover using [Vercel Drains](https://vercel.com/docs/drains/using-drains).

This integration requires a public HTTPS ingestion endpoint and a Vercel Pro or Enterprise team with drain permissions. Vercel usage charges may apply.

## Configure Drains using the data source wizard

1. As a groundcover Admin, open [Data Sources → Vercel](https://app.groundcover.com/data-sources?integration=vercel).
2. Select your backend's public endpoint and create or reuse a third-party [Ingestion key](https://docs.groundcover.com/collect-data/ingestion-keys.md). Newly created keys remain saved when you close the wizard.
3. Optionally add **Service name** and **Environment** enrichment. These static values apply to every record; use separate drains when projects need different values.
4. Follow [Vercel's drain setup guide](https://vercel.com/docs/drains/using-drains) to create separate log and trace drains with **Custom Endpoint** destinations. Copy each endpoint and its headers from the wizard. Keys are masked on screen; copying headers includes the full key, so keep them private.

| Signal                                                    | HTTPS endpoint path | Format / Content-Type                              |
| --------------------------------------------------------- | ------------------- | -------------------------------------------------- |
| [Logs](https://vercel.com/docs/drains/reference/logs)     | `/json/logs`        | NDJSON / `application/x-ndjson`                    |
| [Traces](https://vercel.com/docs/drains/reference/traces) | `/v1/traces`        | Protobuf over OTLP/HTTP / `application/x-protobuf` |

Keep `Authorization: Bearer <GROUNDCOVER_INGESTION_KEY>` in both destinations. For either signal's JSON alternative, select JSON and use `Content-Type: application/json`.

## Verify delivery and correlation

Save the drains in Vercel, generate traffic, then filter [Logs](https://app.groundcover.com/logs) by `projectId:"<VERCEL_PROJECT_ID>"` using your selected project's ID, and check [Traces](https://app.groundcover.com/traces). **Got it** only closes the wizard; it does not configure drains or validate delivery.

For log-to-trace correlation, an Admin must apply the wizard's **Log mapping (required for correlation)** rule in [Logs Pipeline](https://docs.groundcover.com/collect-data/data-pipelines/log-pipelines.md). Add a project-scoped rule for every selected project using its exact ID, simulate representative logs from every project, and confirm canonical `trace_id` / `span_id` match the ingested traces. The mapping is not applied automatically, and sampled-out traces cannot be linked.

For Terraform-managed pipelines, use the full [pipeline export](https://docs.groundcover.com/collect-data/data-pipelines/log-pipelines.md#managing-with-terraform). Add one `ottlRules` entry per project with a unique `ruleName` and the wizard's `conditions`/`statements`, preserving existing rules in the same `groundcover_logspipeline.value`. The wizard's rule body alone is not a complete Terraform value; UI-only changes are overwritten by the next apply.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.groundcover.com/collect-data/data-sources/vercel.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
