@@ -20,22 +20,41 @@ You can sign up for Sentry and create a Remix project from visiting
20
20
[ this url] ( https://sentry.io/signup/?project_platform=javascript-remix ) and
21
21
filling out the signup form.
22
22
23
- ## Onboarding
23
+ ## Setting up the sentry-vite plugin
24
24
25
25
Once you see the onboarding page which has the DSN, copy that somewhere (this
26
- becomes ` SENTRY_DSN ` ). Then click
27
- [ this] ( https://sentry.io/orgredirect/settings/:orgslug/developer-settings/new-internal/ )
28
- to create an internal integration. Give it a name and add the scope for
29
- ` Releases:Admin ` . Press Save, find the auth token at the bottom of the page
30
- under "Tokens", and copy that to secure location (this becomes
31
- ` SENTRY_AUTH_TOKEN ` ). Then visit the organization settings page and copy that
32
- organization slug (` SENTRY_ORG_SLUG ` ).
33
-
34
- Now, set the secrets in Fly.io:
26
+ becomes ` SENTRY_DSN ` ). Now, set the sentry dsn secret in Fly.io to be used as an
27
+ env var during runtime:
35
28
36
29
``` sh
37
- fly secrets set SENTRY_DSN=< your_dsn> SENTRY_AUTH_TOKEN= < your_auth_token > SENTRY_ORG= < your_org_slug > SENTRY_PROJECT=javascript-remix
30
+ fly secrets set SENTRY_DSN=< your_dsn>
38
31
```
39
32
40
- Note that ` javascript-remix ` is the name of the default Remix project in Sentry
41
- and if you use a different project name you'll need to update that value here.
33
+ See the guide for the remix
34
+ [ here] ( https://docs.sentry.io/platforms/javascript/guides/remix/ ) . Run the
35
+ installation wizard but note that some of the steps included already exist in
36
+ this codebase so be sure to remove any duplication.
37
+
38
+ To generate the auth token, click
39
+ [ this] ( https://sentry.io/orgredirect/settings/:orgslug/developer-settings/new-internal/ )
40
+ to create an internal integration (which grants the selected capabilities to the
41
+ recipient, similar to how RBAC works). Give it a name and add the scope for
42
+ ` Releases:Admin ` . Press Save, find the auth token at the bottom of the page
43
+ under "Tokens", and copy that to secure location (this becomes
44
+ ` SENTRY_AUTH_TOKEN ` ). Then visit the organization settings page and copy that
45
+ organization slug (` SENTRY_ORG ` ), and the slug name for your project too
46
+ (` SENTRY_PROJECT ` ).
47
+
48
+ Uncomment the sentry-vite plugin in ` vite.config ` and the build command in the
49
+ 'build' section of the Dockerfile, which shows how to pass the
50
+ ` SENTRY_AUTH_TOKEN ` (below) as a docker secret, so it is available to the vite
51
+ config when ` npm run build ` is run (you will need to do the same for
52
+ ` SENTRY_ORG ` and ` SENTRY_PROJECT ` ). Note that these do not need to be added to
53
+ the ` env.server ` env vars schema, as they are only used during the build and not
54
+ the runtime.
55
+
56
+ The plugin will create sentry releases for you and automatically associate
57
+ commits during the vite build once you set the ` SENTRY_AUTH_TOKEN ` in
58
+ [ your GitHub action secrets] ( https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions ) .
59
+ In this setup we have utilized a simple strategy for naming releases of using
60
+ the commit sha, passed in as a build arg via the GitHub action workflow.
0 commit comments