Skip to content

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 ​

SentNot sent
An error inside a componentA 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 handledAn 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 handledA 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 releaseAn 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: false stops 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 BrowserSession integration is removed; autoSessionTracking no 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.

VariableMeaning
APP_SENTRY_DSN, ADMIN_SENTRY_DSN, WEBSITE_SENTRY_DSNEach frontend's own project. A frontend reads the one named after its folder. Empty: reporting is off
SENTRY_ENVIRONMENTExactly 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_RELEASEThe git sha of the build. In a checkout, when not set, git rev-parse HEAD
SENTRY_AUTH_TOKENOptional, 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_PROJECTWhere 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 ​

  1. Build the frontend with its DSN, SENTRY_ENVIRONMENT=local, and open it with ?token=abc in the address.
  2. In the browser console: console.log('private text'), then setTimeout(() => { throw new Error('check') }) and setTimeout(() => Promise.reject(new Error('check'))). Both events answer 200 from GlitchTip and appear in the frontend's project under environment local.
  3. setTimeout(() => Promise.reject({ code: 'NOT_FOUND', status: 404 })), an aborted fetch, or a fetch to an address that does not answer: nothing is sent.
  4. 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):

appadminwebsite
Unhandled error200200200
Unhandled rejection200200200
Unhandled 5xx refusal200200200
403, 404, no response, AbortError, aborted fetch, network failure (6 unhandled rejections that did fire)0 events0 events0 events
?token=, utm_source, #fragment, console text in any payloadabsentabsentabsent
Without a DSNsentryDsn:"" in the build; the SDK is not loadedsamesame

For the owner ​

Production reports nothing until these steps are done. They change the deployment, which this task did not touch.

  1. DSN per frontend, BUILD_TIME. On DigitalOcean, as build-time variables of the component: APP_SENTRY_DSN (project storedeputy-app), ADMIN_SENTRY_DSN (storedeputy-admin), WEBSITE_SENTRY_DSN (storedeputy-website). The Dockerfile already declares them as build arguments of the app-build, admin-build and website-build stages. Never mix the three.
  2. SENTRY_ENVIRONMENT=prod, RUN_AND_BUILD_TIME (the API of STOR-114 reads the same name at run time).
  3. 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 commit github.sha. Without it events arrive without a release.
  4. Source maps (optional). SENTRY_AUTH_TOKEN must be a BuildKit secret, never a build argument. Community reports say DigitalOcean's Dockerfile builder has no BuildKit, so the Dockerfile does not mount it yet: decide where the image is built before adding RUN --mount=type=secret,id=sentry_auth_token,env=SENTRY_AUTH_TOKEN to the three stages, with APP_/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.