Sentry — manual setup (outside the repo)
After the code wiring is in place, a human still needs to configure Sentry and GitHub. UIs change; this is a loose checklist.
1. Sentry (sentry.io or your self-hosted URL)
- Sign in and open your organization.
- Create projects for each surface you use (e.g. separate projects for production vs dev, and for browser vs server, if you want them split).
- For each project, open Settings → Client Keys (DSN) and copy the DSN. Put these into the right environment / deploy config for your app (not necessarily committed; use secrets or env files that are gitignored).
- For source maps from CI, create an organization auth token (or a token Sentry documents for release uploads) with the scopes needed for releases and source map upload. You will use this as
SENTRY_AUTH_TOKENat build time only.
2. GitHub (or your CI)
- In the repository → Settings → Secrets and variables (and Environments if you use them), add
SENTRY_AUTH_TOKEN(or the name your workflow reads). Point your workflow job at that secret sodeploy/Docker builds receive the token (see your workflow file). - If you use a named Environment (e.g.
CI), attach the secret there and reference that environment from the workflow job so the secret is available duringdocker build.
3. Local developer machine
- Optionally create
<clients-build>/.env.sentry-build-plugin(path may differ in your repo) containingSENTRY_AUTH_TOKEN=...so localvite buildcan upload source maps. Keep this file gitignored. - Run
saf-git-hashes(or your equivalent) before production builds so release/git metadata matches what you expect.
4. Sanity checks
- Trigger a build that runs
vite buildwith the token set; confirm releases / artifacts appear in Sentry for the right project. - Trigger a test error from the app and confirm the issue lands in the intended project with readable stack traces.
When anything breaks, use Sentry’s docs for releases, source maps, and Vite — their wizard labels move around over time.