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
{{ message }}
This repository was archived by the owner on Dec 4, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+30-24Lines changed: 30 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,15 +12,24 @@ Before proceeding, you'll first want to ensure that your Sentry project is set u
12
12
Make sure build plugins are enabled on your site to see the plugin run.
13
13
14
14
## Installation
15
+
#### UI Installation
16
+
To install plugins via the Netlify UI, go to your team sites list and select the Plugins tab (or follow this direct link to the [plugins directory](https://app.netlify.com/plugins)). Then find "Sentry Build Plugin" and click **Install**.
15
17
16
-
To install, add the following lines to your `netlify.toml` file:
18
+
UI installation is the recommended way to install this Build Plugin unless you need advanced configuration.
19
+
20
+
#### File-based Installation
21
+
Alternatively, to install with file-based installation, add the following lines to your `netlify.toml` file:
17
22
18
23
```toml
19
24
[[plugins]]
20
25
package = "@sentry/netlify-build-plugin"
26
+
27
+
[plugins.inputs]
28
+
sentryOrg = ""
29
+
sentryProject = ""
21
30
```
22
31
23
-
Note: The `[[plugins]]` line is required for each plugin, even if you have other plugins in your `netlify.toml` file already.
32
+
Note: The `[[plugins]]` line is required for each plugin installed via file-based installation, even if you have other plugins in your `netlify.toml` file already.
24
33
25
34
### Create a Sentry Internal Integration
26
35
For Netlify to communicate securely with Sentry, you'll need to create a new internal integration. In Sentry, navigate to: *Settings > Developer Settings > New Internal Integration*.
@@ -33,25 +42,30 @@ Click “Save” at the bottom of the page and grab your token, which you’ll n
33
42
34
43
35
44
### Set Environment Variables in Netlify
36
-
Save the internal integration token as a [site environment variable](https://docs.netlify.com/configure-builds/environment-variables/):
45
+
Save the internal integration token and any other environment variables as [site environment variables](https://docs.netlify.com/configure-builds/environment-variables/):
37
46
1. In Netlify, go to your site's settings.
38
47
2. Click on "Build & deploy".
39
-
3. Add a new environment variable and enter `SENTRY_AUTH_TOKEN` as the name and your internal integration token as the value.
48
+
3. Click “Edit variables” and add `SENTRY_AUTH_TOKEN`, `SENTRY_ORG`, and `SENTRY_PROJECT` with their respective values. For more configuration options see the [environment variables](#environment-variables) section below.
49
+
4. Click "Save".
40
50
41
51

42
52
43
-
### Configuration
44
-
Configure the plugin with your Sentry settings:
45
-
```toml
46
-
[[plugins]]
47
-
package = "@sentry/netlify-build-plugin"
53
+
For more information about the parameters below, please see the [Sentry release management docs](https://docs.sentry.io/cli/releases/).
48
54
49
-
[plugins.inputs]
50
-
sentryOrg = ""
51
-
sentryProject = ""
52
-
```
55
+
### Ensure Your SDK is Configured
56
+
To link errors with releases, you must include a release ID (a.k.a version) where you configure your client SDK. For more information, read our documentation on [configuring your SDK for releases](https://docs.sentry.io/workflow/releases/?platform=node#configure-sdk).
53
57
54
-
For more information about the parameters below, please see the [Sentry release management docs](https://docs.sentry.io/cli/releases/).
58
+
#### Environment Variables
59
+
60
+
You can use [site environment variables](https://docs.netlify.com/configure-builds/environment-variables/) to configure these values:
61
+
| name | description | default |
62
+
|------|-------------|---------|
63
+
|`SENTRY_AUTH_TOKEN`| Authentication token for Sentry. | - |
64
+
|`SENTRY_ORG`| The slug of the organization name in Sentry. | - |
65
+
|`SENTRY_PROJECT`| The slug of the project name in Sentry. | - |
66
+
|`SENTRY_RELEASE`| The release ID (a.k.a version). |[COMMIT_REF](https://docs.netlify.com/configure-builds/environment-variables/#git-metadata)|
67
+
|`SENTRY_ENVIRONMENT`| The name of the environment being deployed to. | Netlify [deploy context](https://docs.netlify.com/site-deploys/overview/#deploy-contexts)|
68
+
|`SENTRY_RELEASE_PREFIX`| Set this to prefix the release name with the value. | - |
55
69
56
70
57
71
#### Plugin Inputs
@@ -60,17 +74,9 @@ For more information about the parameters below, please see the [Sentry release
60
74
|`sentryOrg`| The slug of the organization name in Sentry. | - |
61
75
|`sentryProject`| The slug of the project name in Sentry. | - |
62
76
|`sentryAuthToken`| Authentication token for Sentry. We recommend this be set as an environment variable (see below). | - |
77
+
|`sentryRelease`| The release ID (a.k.a version). |[COMMIT_REF](https://docs.netlify.com/configure-builds/environment-variables/#git-metadata)|
63
78
|`sourceMapPath`| Folder in which to scan for source maps to upload. | Netlify publish directory |
64
79
|`sourceMapUrlPrefix`| Prefix for the location of source maps. |`"~/"`|
65
80
|`skipSetCommits`| Set this to true if you want to disable commit tracking. |`false`|
66
81
|`skipSourceMaps`| Set this to true if you want to disable sending source maps to Sentry. |`false`|
67
-
68
-
#### Environment Variables
69
-
70
-
You can also use [site environment variables](https://docs.netlify.com/configure-builds/environment-variables/) to configure these values:
71
-
| name | description | default |
72
-
|------|-------------|---------|
73
-
|`SENTRY_AUTH_TOKEN`| Authentication token for Sentry. | - |
74
-
|`SENTRY_ORG`| The slug of the organization name in Sentry. | - |
75
-
|`SENTRY_PROJECT`| The slug of the project name in Sentry. | - |
76
-
|`SENTRY_ENVIRONMENT`| The name of the environment being deployed to. | Netlify [deploy context](https://docs.netlify.com/site-deploys/overview/#deploy-contexts)|
82
+
|`releasePrefix`| Set this to prefix the release name with the value. | - |
0 commit comments