Development

Error Monitoring

Sentry integration for error reporting in web and desktop builds.

Error Monitoring

Gerbtrace uses Sentry for error reporting and user feedback. The integration covers both the web app and the desktop app.

Organization: newmatik | Project: gerbtrace

Web app

The web app uses @sentry/nuxt. Configuration is split across:

  • sentry.client.config.ts – client-side Sentry init
  • sentry.server.config.ts – server-side Sentry init
  • nuxt.config.ts – module registration and runtimeConfig.public.sentry

Set SENTRY_DSN in the environment when building. Optionally set SENTRY_AUTH_TOKEN for source map uploads.

The web deploy pipeline (currently Cloudflare Workers Builds unless replaced by a checked-in deploy workflow) uses both secrets.

Desktop app

The desktop app uses the sentry Rust crate with the panic feature so native Rust panics are captured and sent to Sentry.

The DSN is set at build time via the SENTRY_DSN environment variable. The binary reads it with option_env!("SENTRY_DSN") and falls back to std::env::var("SENTRY_DSN") at runtime.

The desktop build workflow (.github/workflows/build-desktop.yml) passes SENTRY_DSN from GitHub secrets to the Tauri build.

User bug reports

Users open Report a Bug from the help menu in the app header (question-mark icon), including visitors who are not signed in. The same menu has Documentation and, on the website, Contact Support, which opens the Help Scout beacon. The desktop app hides Contact Support and keeps Report a Bug.

The form takes an optional email for anonymous visitors and a description. Submissions are sent with Sentry captureFeedback.

Setup

Getting DSN and auth token

  • DSN: Sentry project settings > Client Keys (DSN)
  • Auth token (optional): Sentry settings > Auth Tokens. Create a token with project:releases scope.

Setting GitHub secrets

Using the GitHub CLI:

# Interactive setup
node scripts/set-sentry-secrets.mjs

# Or manually
echo -n "YOUR_SENTRY_DSN" | gh secret set SENTRY_DSN
echo -n "YOUR_SENTRY_AUTH_TOKEN" | gh secret set SENTRY_AUTH_TOKEN

Or set them in the GitHub UI: Repo > Settings > Secrets and variables > Actions.

Re-running the Sentry wizard

The configuration is already in the repo, but to re-run or update:

npx @sentry/wizard@latest -i nuxt --saas --org newmatik --project gerbtrace