Skip to content

Commit 24333e3

Browse files
committed
feat: Add docs about vercel drains via vercel marketplace integration
1 parent f34c47a commit 24333e3

File tree

1 file changed

+41
-17
lines changed

1 file changed

+41
-17
lines changed

docs/product/drains/integration/vercel.mdx

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ sidebar_order: 40
44
description: Learn how to set up Vercel drains to forward logs and traces data to Sentry.
55
---
66

7-
Vercel Drains let you forward traces and logs from applications running on Vercel to Sentry.
7+
Vercel Drains let you forward traces and logs from applications running on Vercel to Sentry. For more information on Vercel Drains, see the [Vercel drain documentation](https://vercel.com/docs/drains). Currently only Logs and Traces are supported.
8+
9+
- **Logs**: Runtime, build, and static logs from your deployments
10+
- **Traces**: Distributed tracing data collected via OpenTelemetry (OTLP) from your applications
811

912
## Prerequisites
1013

@@ -13,30 +16,34 @@ Before you begin, ensure you have:
1316
- A Vercel project that you want to monitor
1417
- A Sentry project you want to send data to
1518

16-
## Set up a Drain
19+
## Automatic Drain Setup via the Vercel Marketplace Integration
1720

18-
To set up a Drain in Vercel you'll need to create a new Drain in the Vercel settings. For more information on Vercel Drains, please see the [Vercel drain documentation](https://vercel.com/docs/drains).
21+
If you've installed the [Sentry Vercel Integration](https://vercel.com/marketplace/sentry), you can set up a drain via the integration.
1922

20-
1. From the Vercel dashboard, go to **Team Settings > Drains** and click **Add Drain**.
21-
2. Choose a data type. Currently only Logs and Traces are supported.
23+
First, you'll need to install the Sentry Vercel Integration. You can do this by clicking the "Install" button in the [Sentry Vercel Integration](https://vercel.com/marketplace/sentry) page.
24+
25+
Then you can add a Drain from your Vercel team's Integrations tab.
26+
27+
1. From the Vercel dashboard, view the integrations list by clicking the **Integrations** tab.
28+
2. Select the **Sentry** integration from the integrations list to view the integration settings.
29+
3. Click **Manage** and select your installed product
30+
4. Under **Drains**, click **Add Drain** to create a new drain.
31+
5. Configure which project you would like to send data from and click **Create Drain** to create the drain.
2232

23-
- [Logs](#log-drains): Runtime, build, and static logs from your deployments (supports custom endpoints and native integrations)
24-
- [Traces](#trace-drains): Distributed tracing data in OpenTelemetry format (supports custom endpoints and native integrations)
33+
## Manual Drain Setup
34+
35+
To set up a Drain in Vercel manually, you'll need to create a new Drain in the Vercel settings.
36+
37+
1. From the Vercel dashboard, go to **Team Settings > Drains** and click **Add Drain**.
38+
2. Choose a data type.
2539

26-
### Log Drains
40+
### Manual Log Drain Setup
2741

2842
After selecting the Logs data type, you'll need to configure the drain to send data to Sentry.
2943

3044
1. Provide a name for your drain and select which projects should send data to your endpoint. You can choose all projects or select specific ones.
3145
2. Configure the sampling rate to control the volume of data sent to your drain. We recommend sampling 100% of the data to ensure you get all the data you need.
32-
3. Select which log sources to collect
33-
34-
- **Functions**: Outputs log data from Vercel Functions like API Routes
35-
- **Edge Functions**: Outputs log data from Vercel Functions or Routing Middleware using Edge runtime
36-
- **Static Files**: Collects logs for static assets like HTML and CSS files
37-
- **Rewrites**: Collects log results for external [rewrites](https://vercel.com/docs/project-configuration#rewrites) to a different domain
38-
- **Builds**: Outputs log data from the Build Step
39-
- **Firewall**: Outputs log data from requests denied by [Vercel Firewall](https://vercel.com/docs/vercel-firewall) rules
46+
3. Select which log sources to collect. See [Log Source Details](#log-source-details) for more information.
4047

4148
4. Select which environments to drain from. You can choose to drain from all environments or select specific ones.
4249
5. Under the custom endpoint tab add the Sentry Vercel Log Drain Endpoint in the URL field. You can find the endpoint in your [Sentry Project Settings](https://sentry.io/settings/projects/) under **Client Keys (DSN)** > **Vercel**. You can select either JSON or NDJSON encoding.
@@ -53,7 +60,7 @@ x-sentry-auth: sentry sentry_key=___PUBLIC_KEY___
5360

5461
7. To test that the log drain is working, you can send a test log to your drain by clicking the Test button.
5562

56-
### Trace Drains
63+
### Manual Trace Drain Setup
5764

5865
After selecting the Traces data type, you'll need to configure the drain to send data to Sentry.
5966

@@ -73,6 +80,12 @@ x-sentry-auth: sentry sentry_key=___PUBLIC_KEY___
7380

7481
5. To test that the trace drain is working, you can send a test trace to your drain by clicking the Test button.
7582

83+
<Alert level="warning">
84+
85+
Sending [metrics](/product/explore/metrics/) via Vercel Metric Drains (Speed Insights, Web Analytics) are currently not currently supported. If you're interested this support for this please reach out on [GitHub](https://github.com/getsentry/sentry/issues/103488) or or email us at [feedback-metrics@sentry.io](mailto:feedback-metrics@sentry.io).
86+
87+
</Alert>
88+
7689
## Troubleshooting
7790

7891
<Expandable title="Logs with empty messages">
@@ -92,3 +105,14 @@ x-sentry-auth: sentry sentry_key=___PUBLIC_KEY___
92105
use a combination of the `vercel.project_name`, `vercel.deployment_id`, and
93106
`vercel.build_id` fields to grab logs from a specific build.
94107
</Expandable>
108+
109+
## Log Source Details
110+
111+
Vercel Log Drains support the following log sources:
112+
113+
- **Functions**: Outputs log data from Vercel Functions like API Routes
114+
- **Edge Functions**: Outputs log data from Vercel Functions or Routing Middleware using Edge runtime
115+
- **Static Files**: Collects logs for static assets like HTML and CSS files
116+
- **Rewrites**: Collects log results for external [rewrites](https://vercel.com/docs/project-configuration#rewrites) to a different domain
117+
- **Builds**: Outputs log data from the Build Step
118+
- **Firewall**: Outputs log data from requests denied by [Vercel Firewall](https://vercel.com/docs/vercel-firewall) rules

0 commit comments

Comments
 (0)