You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/organization/integrations/deployment/vercel/index.mdx
+19-7Lines changed: 19 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,8 @@ If you make changes to your organization slug, you'll need to update your config
16
16
17
17
</Alert>
18
18
19
-
Connect your Sentry and Vercel projects to automatically notify Sentry of every deployment and upload source maps for your Next.js application.
19
+
Connect your Sentry and Vercel projects to automatically notify Sentry of every deployment and upload source maps for your Next.js application. You can also set up Vercel Drains to forward logs and traces data from Vercel to Sentry.
20
+
20
21
To learn more about using Sentry in your Next.js app, check out the [Next.js SDK](/platforms/javascript/guides/nextjs/).
21
22
22
23
### Install
@@ -69,6 +70,10 @@ Use Vercel to [link projects](#project-linking) for uploading source maps and no
69
70
- Add a Sentry bundler plugin to your bundler configuration ([webpack plugin](https://www.npmjs.com/package/@sentry/webpack-plugin), [Vite Plugin](https://www.npmjs.com/package/@sentry/vite-plugin), [Esbuild Plugin](https://www.npmjs.com/package/@sentry/esbuild-plugin), [Rollup Plugin](https://www.npmjs.com/package/@sentry/rollup-plugin)). If you are using Sentry's Next.js, or SvelteKit SDKs this will already have been done for you.
70
71
- In case you already have a Vercel project integrated with Sentry, ensure the Sentry project you link is the one you're already using to report errors.
71
72
73
+
### Drains
74
+
75
+
You can set up [Vercel Drains](https://vercel.com/docs/drains) via the Vercel integration to forward logs and traces data from Vercel to Sentry. See the [Vercel Drains documentation](/product/drains/integration/vercel/#automatic-drain-setup) for more information.
76
+
72
77
### Uninstallation
73
78
74
79
1. You can uninstall the integration from Vercel or Sentry. To do so in Sentry, navigate to **Settings > Integrations > Vercel > Configurations**, click "Uninstall", and confirm.
@@ -79,12 +84,14 @@ Use Vercel to [link projects](#project-linking) for uploading source maps and no
79
84
80
85
### Troubleshooting
81
86
82
-
#### Failed to fetch
87
+
<Expandabletitle="Failed to fetch">
83
88
84
89

85
90
86
91
This issue typically occurs if you have an ad blocker blocking the conversation between Vercel and Sentry during setup. To remediate the issue, disable your ad blocker and go through the installation flow again.
87
92
93
+
</Expandable>
94
+
88
95
## Vercel Marketplace
89
96
90
97
The Vercel Marketplace integration allows existing Vercel users to onboard to Sentry with a one-click workflow. This setup is designed for **new Sentry users** and unifies billing within the Vercel platform.
@@ -102,7 +109,9 @@ Subscription settings can only be modified within Sentry. During setup, organiza
102
109
### User Access
103
110
104
111
<Alert>
105
-
Only the individual who sets up Sentry using the one-click workflow will have a Sentry user account created for them. To enable single sign-on access from Vercel for other users, they must be invited to the Sentry organization.
112
+
Only the individual who sets up Sentry using the one-click workflow will have
113
+
a Sentry user account created for them. To enable single sign-on access from
114
+
Vercel for other users, they must be invited to the Sentry organization.
106
115
</Alert>
107
116
108
117
Vercel users will have single sign-on access to Sentry using the "Open in Sentry" button within Vercel, and will be able to create new projects in either Vercel or Sentry.
@@ -113,10 +122,13 @@ Users will still be able to login to their Sentry organization directly, without
113
122
114
123
For every project configured, the following environment variables will be set within the Vercel deployment:
115
124
116
-
-**SENTRY_PROJECT**
117
-
-**SENTRY_AUTH_TOKEN**
118
-
-**NEXT_PUBLIC_SENTRY_DSN**
119
-
-**SENTRY_ORG**
125
+
-**SENTRY_PROJECT**: Your configured Sentry project
126
+
-**SENTRY_AUTH_TOKEN**: The Sentry authentication token for the Vercel Internal Integration
127
+
-**NEXT_PUBLIC_SENTRY_DSN**: The DSN for your Sentry project
128
+
-**SENTRY_ORG**: Your Sentry organization
129
+
-**SENTRY_VERCEL_LOG_DRAIN_URL**: The Vercel Log Drain URL for your Sentry project (used for Vercel Log Drains)
130
+
-**SENTRY_OTLP_TRACES_URL**: The OTLP Traces Drain URL for your Sentry project (used for Vercel Trace Drains)
131
+
-**SENTRY_PUBLIC_KEY**: The public key for your Sentry project (used for authentication with log/trace drains)
Copy file name to clipboardExpand all lines: docs/product/drains/integration/vercel.mdx
+41-17Lines changed: 41 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,10 @@ sidebar_order: 40
4
4
description: Learn how to set up Vercel drains to forward logs and traces data to Sentry.
5
5
---
6
6
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
8
11
9
12
## Prerequisites
10
13
@@ -13,30 +16,34 @@ Before you begin, ensure you have:
13
16
- A Vercel project that you want to monitor
14
17
- A Sentry project you want to send data to
15
18
16
-
## Set up a Drain
19
+
## Automatic Drain Setup
17
20
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.
19
22
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
+
If you haven't installed the integration, you can follow the instructions in the [Sentry Vercel Integration documentation](/organization/integrations/deployment/vercel/#install) to install the integration.
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.
22
32
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.
25
39
26
-
### Log Drains
40
+
### Manual Log Drain Setup
27
41
28
42
After selecting the Logs data type, you'll need to configure the drain to send data to Sentry.
29
43
30
44
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.
31
45
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.
40
47
41
48
4. Select which environments to drain from. You can choose to drain from all environments or select specific ones.
42
49
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.
5. To test that the trace drain is working, you can send a test trace to your drain by clicking the Test button.
75
82
83
+
<Alertlevel="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 [[email protected]](mailto:[email protected]).
0 commit comments