Error tracking (GlitchTip)
Status · 8 November 2026 (STOR-115). Checked on a developer's machine only, in a real browser against GlitchTip, with environment
local. Nothing is deployed: production reports nothing until the owner sets the build variables below (For the owner). This page covers the three browser frontends; the API is STOR-114.
When something breaks in a person's browser, the team now hears about it. Until STOR-115, a broken component, a part of the app that failed to load after a release or an unhandled exception left the person with an empty screen or a dead button, and the team with nothing: no event, no release in which it started. The app (owners and their teams), the admin console (Store Deputy's operators) and the website (buyers) now send such errors to the company's self-hosted GlitchTip (errors.dreamvention.com, compatible with Sentry, organization dreamvention), each to its own project: storedeputy-app, storedeputy-admin, storedeputy-website. Each event carries the environment and the release. Errors the person already sees and understands are not sent.
What is sent, and what is not
| Sent | Not sent |
|---|---|
| An error inside a component | A refusal from the API with a 4xx status (wrong password, no access, not found): the page already shows it |
| An unhandled error or a rejected promise nobody handled | An API error with no response (status 0): the page says the API could not be reached |
| A refusal from the API with a 5xx status that nobody handled | A cut-off request (AbortError) or a failed one (the browsers' Failed to fetch, NetworkError when attempting to fetch resource., Load failed) |
| A part of the app that failed to load, typically after a release | An error raised by a browser extension (chrome-extension://, moz-extension://, Safari's) |
| A failed navigation; an error while the app starts |
What leaves the browser
Only what is needed to find the fault:
- Addresses lose their query string and fragment (the connect link carries the shop's admin address, which includes its session token), in the event, in the stack and in the breadcrumbs.
- No request or response bodies, no cookies, no headers. SDK 11 no longer has
sendDefaultPii: its successor,dataCollection, collects everything by default, so every switch is turned off explicitly (user details and IP, cookies, headers, bodies, query strings, GraphQL, AI inputs, database and queue data, stack variables, source lines).enhanceFetchErrorMessages: falsestops the SDK from rewriting "Failed to fetch" in errors the app itself catches. - No tokens, keys or passwords (
Bearer …, JWTs,sd_…API keys, long opaque strings) and no e-mail addresses in any text of the event; keys named like a token, password, body or content are replaced. - No console or typing breadcrumbs. A request breadcrumb keeps its method, address without query and status; a navigation keeps two paths without query. No chat, page, shop, product or customer text.
- The person is known by id only: no e-mail, name or IP address. The app and the console set the id of whoever is signed in; the website has no accounts.
- No sessions (the
BrowserSessionintegration is removed;autoSessionTrackingno longer exists since SDK 8), no replay, no profiling, no tracing (tracesSampleRate: 0), no component props (attachProps: false).
How it is built
Each frontend has the same setup slice, slices/setup/monitor/, with three files identical in app/, admin/ and website/: the slice configuration (variables, source maps), the client-only plugin plugins/monitor.client.ts and the policy utils/monitor.ts (what is sent, what is scrubbed, which settings start it). A test in the app checks that the three copies have not drifted apart and tests the policy once. The app and the console add a small plugin in their sign-in slice that passes the signed-in person's id. The SDK is the official @sentry/vue, version 11.8.0 exactly (no ^); source maps use @sentry/vite-plugin 11.8.0.
Variables
All three frontends are generated (nuxt generate) and served as static files, so the variables are read when the frontend is built, not when it runs. The names are the owner's GlitchTip standard, the same as Bonsite's.
| Variable | Meaning |
|---|---|
APP_SENTRY_DSN, ADMIN_SENTRY_DSN, WEBSITE_SENTRY_DSN | Each frontend's own project. A frontend reads the one named after its folder. Empty: reporting is off |
SENTRY_ENVIRONMENT | Exactly prod, dev or local. GlitchTip keeps every environment name forever, so there are only three. Missing or anything else: reporting does not start, and the browser console says why in one line; the page works as usual. The SDK's default, production, therefore never reaches GlitchTip. make dev always sets local |
SENTRY_RELEASE | The git sha of the build. In a checkout, when not set, git rev-parse HEAD |
SENTRY_AUTH_TOKEN | Optional, build only, secret: a BuildKit secret in Docker, never a build argument. With it, source maps are uploaded |
SENTRY_URL, SENTRY_ORG, APP_/ADMIN_/WEBSITE_SENTRY_PROJECT | Where the maps go: https://errors.dreamvention.com, dreamvention (both are the defaults), the project slug |
NUXT_PUBLIC_SENTRY_DSN, _ENVIRONMENT and _RELEASE, when set, take precedence (Nuxt's own names). In the production Dockerfile the three frontend stages declare these names as build arguments, all empty by default. The examples are in app/.env.example, admin/.env.example and website/.env.example.
Source maps
Without SENTRY_AUTH_TOKEN the build makes no source maps and uploads nothing; stack traces in GlitchTip then point into minified files. With the token, the build makes hidden maps (the published files carry no link to them), uploads them and deletes them. Either way the build removes any .map file from the published output (a Nuxt hook, and find -delete in the Dockerfile), so the public site never serves one. A failed upload is a warning in the build log, not a failed build.
How to turn it off
Leave the frontend's *_SENTRY_DSN empty (the default everywhere: local stand, tests, CI) or set SENTRY_ENVIRONMENT to anything but the three names. Then the SDK is not even downloaded and the browser makes no request to GlitchTip. Because the frontends are static, turning it off in production means building again without the variable.
How to verify
- Build the frontend with its DSN,
SENTRY_ENVIRONMENT=local, and open it with?token=abcin the address. - In the browser console:
console.log('private text'), thensetTimeout(() => { throw new Error('check') })andsetTimeout(() => Promise.reject(new Error('check'))). Both events answer 200 from GlitchTip and appear in the frontend's project under environmentlocal. setTimeout(() => Promise.reject({ code: 'NOT_FOUND', status: 404 })), an abortedfetch, or afetchto an address that does not answer: nothing is sent.- In the event: the address has no
?token=, and "private text" appears nowhere.
What was checked on 8 November 2026 (headless Chrome, each frontend built with its DSN, environment local, tag task=STOR-115):
| app | admin | website | |
|---|---|---|---|
| Unhandled error | 200 | 200 | 200 |
| Unhandled rejection | 200 | 200 | 200 |
| Unhandled 5xx refusal | 200 | 200 | 200 |
403, 404, no response, AbortError, aborted fetch, network failure (6 unhandled rejections that did fire) | 0 events | 0 events | 0 events |
?token=, utm_source, #fragment, console text in any payload | absent | absent | absent |
| Without a DSN | sentryDsn:"" in the build; the SDK is not loaded | same | same |
For the owner
Production reports nothing until these steps are done. They change the deployment, which this task did not touch.
- DSN per frontend, BUILD_TIME. On DigitalOcean, as build-time variables of the component:
APP_SENTRY_DSN(projectstoredeputy-app),ADMIN_SENTRY_DSN(storedeputy-admin),WEBSITE_SENTRY_DSN(storedeputy-website). TheDockerfilealready declares them as build arguments of theapp-build,admin-buildandwebsite-buildstages. Never mix the three. SENTRY_ENVIRONMENT=prod, RUN_AND_BUILD_TIME (the API of STOR-114 reads the same name at run time).SENTRY_RELEASE= the deployed git sha. DigitalOcean's bindable${_self.COMMIT_HASH}is documented as reaching a Dockerfile build only at run time; the frontends need it at build time. Untested options: an app-level BUILD_TIME variable${<component>.COMMIT_HASH}(a DigitalOcean community workaround), or a deploy from GitHub Actions passing the commitgithub.sha. Without it events arrive without a release.- Source maps (optional).
SENTRY_AUTH_TOKENmust be a BuildKit secret, never a build argument. Community reports say DigitalOcean's Dockerfile builder has no BuildKit, so theDockerfiledoes not mount it yet: decide where the image is built before addingRUN --mount=type=secret,id=sentry_auth_token,env=SENTRY_AUTH_TOKENto the three stages, withAPP_/ADMIN_/WEBSITE_SENTRY_PROJECT. Without it the build passes and uploads nothing.
The DSNs are not secret in the strict sense (they end up in the published JavaScript), but they are not written into the repository: only the variable names are.