Sentry
This page says which Sentry project each Seed program reports errors to, where each Sentry setting is in the code and the build workflows, and how to find and read an error.

Seed reports errors and crashes to Sentry, a service that collects errors from running programs. This page is for a contributor who needs to find an error or to change what is sent. It does not cover the settings that a Sentry administrator changes in the Sentry web UI.

Three programs report: the web app, the notification service and the desktop app. Each one starts Sentry's client library when a DSN is set. A DSN is the address of a Sentry project. The build workflows upload source maps and the debug symbols of the daemon, so that stack traces are readable.

Projects

All projects are in the Sentry organisation with the slug mintter. A slug is the short name in a Sentry URL. The code names that slug and the project slugs, so they must match.

Project slug

What sends events

Enabled by

seed-site

the web app, both the server and the browser, through @sentry/remix

SITE_SENTRY_DSN

seed-notify

the notification service, through @sentry/bun

NOTIFY_SENTRY_DSN

seed-electron

the desktop app: main process, renderers, preload and native crashes

VITE_DESKTOP_SENTRY_DSN at build time

The Go daemon has no project of its own. Native crashes of the desktop app and its daemon go to seed-electron, which is where the daemon's debug symbols are uploaded.

Without a DSN the Sentry library does nothing. So a local build reports nothing unless you set one.

Environments and releases

Reading an error


    Open the issue in its project and pick the environment and release.

    Click View Source on a stack frame. You should see the original TypeScript. If you see minified JavaScript, the release name that the program sends does not match the release name of the uploaded source maps. Both come from the same variable: SITE_SENTRY_RELEASE for the web app, which is the commit hash, and VITE_VERSION for the desktop app, which is the git tag. Check in the logs of the CI run that built it that both are set.

    For a crash of the daemon in seed-electron, the Go stack should show function names and file paths. If it shows raw addresses, look in Settings โ†’ Projects โ†’ seed-electron โ†’ Debug Files for a seed-daemon-<arch> entry with the build id of that release.

@sentry/vite-plugin and sentry-cli upload the source maps and the releases during the CI build. Both need the repository secret SENTRY_AUTH_TOKEN. When that token expires, events still arrive, but the upload of source maps stops, so traces show minified code.

Where each setting lives in code

Sentry setting

Code location

Project slug

frontend/apps/web/vite.config.mts (project: 'seed-site'); frontend/apps/desktop/vite.{main,renderer,preload,renderer.find-in-page}.config.mts (project: 'seed-electron'); scripts/upload-daemon-symbols.mjs (SENTRY_PROJECT default).

Organisation slug

The same files (org: 'mintter'), and SENTRY_ORG in the desktop workflows.

Sentry start (web)

frontend/apps/web/app/entry.client.tsx for the browser, frontend/apps/web/instrumentation.server.mjs for the server.

Sentry start (notify)

frontend/apps/notify/app/sentry.ts.

Sentry start (desktop)

frontend/apps/desktop/src/main.ts and frontend/apps/desktop/src/renderer.ts.

Release name (web, notify)

SITE_SENTRY_RELEASE and NOTIFY_SENTRY_RELEASE, set from the COMMIT_HASH build argument in each app's Dockerfile.

Release name (desktop)

the VERSION constant from @shm/shared/constants, from the VITE_VERSION variable that CI sets from the git tag.

Environment

SITE_SENTRY_ENVIRONMENT (web), NOTIFY_SENTRY_ENVIRONMENT (notify), SENTRY_ENVIRONMENT and VITE_SENTRY_ENVIRONMENT (desktop).

Sampling rates

in the Sentry start files above.

What gets stripped after upload

sourcemaps.filesToDeleteAfterUpload in the web vite.config.mts.

Secrets passed to builds

.github/workflows/release-desktop.yml, dev-desktop.yml, release-docker-images.yml, dev-docker-images.yml (SENTRY_AUTH_TOKEN and the DSN secrets).

Daemon symbol upload

scripts/upload-daemon-symbols.mjs, called from the release and dev desktop workflows on macOS and Linux. It skips with a warning when SENTRY_AUTH_TOKEN is unset.

See also

    Releasing, which produces the tagged builds.

    The web image sets SITE_SENTRY_ENVIRONMENT=production in its Dockerfile. The server and the browser read that variable, then SENTRY_ENVIRONMENT.

    The notification service reads NOTIFY_SENTRY_ENVIRONMENT, then SENTRY_ENVIRONMENT, then NODE_ENV, and falls back to production.

    The main process of the desktop app reads SENTRY_ENVIRONMENT. Without it, a packaged app reports as production and an app run from source reports as development. The renderer reads VITE_SENTRY_ENVIRONMENT, then the Vite mode.

    Logs and endpoints and health, for the logs and metrics of a running app environment.

    Working on Seed, the list of contributor guides.

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime

Connections0
Linked document ยท Outgoing linkLinked documentLinked document ยท Outgoing linkLinked documentLinked document ยท Outgoing linkLinked documentLinked document ยท Outgoing linkLinked documentLinked document ยท Outgoing linkLinked documentLinked document ยท Outgoing linkLinked documentLinked document ยท Outgoing linkLinked documentLinked document ยท Outgoing linkLinked documentLinked document ยท Outgoing linkLinked documentSentrySentry
Citations 0Children & links 9

Loading child documentsโ€ฆ

Connections show where other documents or comments link to this document.

Related documents

Loading connectionsโ€ฆ