Skip to content

Add Vercel Integration Docs #1854

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jul 21, 2020
1 change: 1 addition & 0 deletions __tests__/__snapshots__/documentation.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,7 @@ Array [
"workflow/integrations/slack/index.html",
"workflow/integrations/split/index.html",
"workflow/integrations/splunk/index.html",
"workflow/integrations/vercel/index.html",
"workflow/issue-owners/index.html",
"workflow/releases/health/index.html",
"workflow/releases/index.html",
Expand Down
2 changes: 2 additions & 0 deletions gatsby/src/docs/workflow/integrations/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ These integrations are set up once per organization, and are then usable in all
- [_JIRA_](/workflow/integrations/jira/) (and Jira Server)
- [_PagerDuty_](/workflow/integrations/pagerduty/)
- [_Slack_](/workflow/integrations/slack/)
- [_Vercel_](/workflow/integrations/vercel/)


These integrations are maintained and supported by the companies that created them. See [integration platform](/workflow/integrations/integration-platform/).

Expand Down
57 changes: 57 additions & 0 deletions gatsby/src/docs/workflow/integrations/vercel/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: Vercel
sidebar_order: 1
---

### Vercel

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.

**Installation**

1. Visit <https://vercel.com/integrations/sentry/add>

2. Select your account and click "Add".

![Sentry modal showing Vercel installation](vercel_install.png)

**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!**

![Sentry modal showing Vercel internal integration](vercel_internal_integration.png)

**Project Linking**

1. Select a Sentry project and a Vercel project to link together.

![Sentry modal showing linking Sentry project to Vercel project](vercel_link_project.png)

* 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**.

![Sentry modal showing linking Sentry project to Vercel project](vercel_env_vars.png)

* `SENTRY_ORG` - the name of your Sentry organization
* `SENTRY_PROJECT` - the name of your linked Sentry project
* `SENTRY_AUTH_TOKEN` - the auth token from the Vercel Internal Integration that was created upon installation
* `NEXT_PUBLIC_SENTRY_DSN` - the linked Sentry project's DSN
* `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

2. Redeploy your Vercel project in order to trigger a release.

**Usage**

* If you have not already done so, [instrument your code with Sentry](/error-reporting/quickstart/).
* Ensure you have [installed a repository integration](/workflow/releases/#install-repo-integration) and added the relevant repository.
* Add the [Sentry Webpack Plugin](https://github.com/getsentry/sentry-webpack-plugin) to your configuration. For NextJS, use `next.config.js`.
* 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.

**Uninstallation**

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.

![Sentry modal showing uninstalling Vercel integration](vercel_uninstall.png)

2. Click "Remove Configuration"

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.

![Sentry modal showing uninstalling Vercel integration](vercel_delete_internal_integration.png)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Vercel
sidebar_order: 1
gatsby: true
---