|
| 1 | +--- |
| 2 | +title: Vercel |
| 3 | +sidebar_order: 1 |
| 4 | +--- |
| 5 | + |
| 6 | +### Vercel |
| 7 | + |
| 8 | +Vercel is an all-in-one platform with Global CDN supporting static and JAMstack deployment and Serverless Functions. Connect your Sentry and Vercel projects to automatically upload source maps and notify Sentry of release deployment. |
| 9 | + |
| 10 | +**Installation** |
| 11 | + |
| 12 | +1. Visit <https://vercel.com/integrations/sentry/add> |
| 13 | + |
| 14 | +2. Select your account and click "Add". |
| 15 | + |
| 16 | +  |
| 17 | + |
| 18 | + **Note that the installation created an internal integration to generate an auth token used in building releases. If the Vercel internal integration is deleted, your Vercel integration will stop working!** |
| 19 | + |
| 20 | +  |
| 21 | + |
| 22 | +**Project Linking** |
| 23 | + |
| 24 | +1. Select a Sentry project and a Vercel project to link together. |
| 25 | + |
| 26 | +  |
| 27 | + |
| 28 | + * This step will generate environment variables in the selected Vercel project. Having these set means you can skip the [CLI Configuration step](https://github.com/getsentry/sentry-webpack-plugin#cli-configuration) in the Sentry Webpack Plugin setup. You can see these in Vercel in **Project Settings** > **General** > **Environment Variables**. |
| 29 | + |
| 30 | +  |
| 31 | + |
| 32 | + * `SENTRY_ORG` - the name of your Sentry organization |
| 33 | + * `SENTRY_PROJECT` - the name of your linked Sentry project |
| 34 | + * `SENTRY_AUTH_TOKEN` - the auth token from the Vercel Internal Integration that was created upon installation |
| 35 | + * `NEXT_PUBLIC_SENTRY_DSN` - the linked Sentry project's DSN |
| 36 | + * `VERCEL_GITHUB_COMMIT_SHA`, `VERCEL_GITLAB_COMMIT_SHA`, or `VERCEL_BITBUCKET_COMMIT_SHA` - your source code provider's commit SHA, used for creating releases and associating commits |
| 37 | + |
| 38 | + 2. Redeploy your Vercel project in order to trigger a release. |
| 39 | + |
| 40 | +**Usage** |
| 41 | + |
| 42 | +* If you have not already done so, [instrument your code with Sentry](/error-reporting/quickstart/). |
| 43 | +* Ensure you have [installed a repository integration](/workflow/releases/#install-repo-integration) and added the relevant repository. |
| 44 | +* Add the [Sentry Webpack Plugin](https://github.com/getsentry/sentry-webpack-plugin) to your configuration. For NextJS, use `next.config.js`. |
| 45 | +* If 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. |
| 46 | + |
| 47 | +**Uninstallation** |
| 48 | + |
| 49 | +1. The integration must be uninstalled from Vercel. Visit the Vercel integration configuration page (**Organization Settings** > **Integrations** > **Vercel** > **Configurations**) and click "Uninstall" then "Visit Vercel" in the modal that pops up. |
| 50 | + |
| 51 | +  |
| 52 | + |
| 53 | +2. Click "Remove Configuration" |
| 54 | + |
| 55 | +3. Delete the internal integration that was created by navigating to **Organization Settings** > **Developer Settings** and clicking the trash can icon next to **Vercel Internal Integration**. You will be prompted to confirm the deletion by entering a string provided in the modal. Enter the string and click "Confirm" to finalize the deletion. |
| 56 | + |
| 57 | +  |
0 commit comments