Skip to content

Commit

Permalink
doc: Describe how to setup Sentry config
Browse files Browse the repository at this point in the history
  • Loading branch information
rtau committed Jun 24, 2024
1 parent 4443ea6 commit 239f653
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,30 @@ Build the app with SEO optimized pages.

## Error Reporting

Sentry can be used to collect errors and events form users for troubleshooting purpose. To enable the integration, the following steps are required.
Sentry can be used to collect errors and events from users for troubleshooting purpose. To enable the integration, the following steps are required.

### Configure Sentry DSN
### Pre-requisite

1. A project created on Sentry (either sentry.io or your own Sentry installation), [with DSN](https://docs.sentry.io/concepts/key-terms/dsn-explainer/#where-to-find-your-dsn) created.

### Enable Sentry during build time

Set the DSN to the environment variable `VITE_SENTRY_DSN` when you build the project.
Can be injected in GitHub Actions by secret `SENTRY_DSN`

### Automating Sentry-related tasks at build time

Set these environment variables in CI/CD pipeline:
```
# You can derieve the SENTRY_ORG and SENTRY_PROJECT (their slug) from your Sentry project URL. For example, "https://my-org.sentry.io/projects/my-project/", then SENTRY_ORG=my-org, SENTRY_PROJECT=my-project
SENTRY_ORG=
SENTRY_PROJECT=
SENTRY_AUTH_TOKEN=<See how to get it from https://docs.sentry.io/account/auth-tokens/>
```

Can be injected in GitHub Actions by Variables `SENTRY_ORG`, `SENTRY_PROJECT` and secret `SENTRY_AUTH_TOKEN`.

Reference: https://github.com/getsentry/sentry-javascript-bundler-plugins

## Contributors

Expand Down

0 comments on commit 239f653

Please sign in to comment.