Frontend Error Monitoring¶
The frontend reports uncaught JavaScript errors, server 5xx responses, and a 5% sample of route navigations to GlitchTip, EPFL ENAC-IT's self-hosted, Sentry-compatible error tracker. We use GlitchTip rather than hosted Sentry so error data stays on EPFL infrastructure. Wired in issue #344 — see the implementation plan.
Access¶
- Dashboard: enac-it-glitchtip.epfl.ch. Sign in with a dedicated GlitchTip account (not EPFL SSO). Ask nicdub for an account and project membership.
- Runbook: ENAC-IT's Sentry self-host via GlitchTip Notion page — how the server is operated.
- Product docs: glitchtip.com/documentation.
- Project DSN: stored in ENAC-IT's Infisical vault, never in the repo. Where and how to get access: Tools and access.
How errors reach GlitchTip¶
There is no Sentry SDK. src/utils/glitchtip.ts is a ~2 KB
dependency-free reporter that speaks the GlitchTip envelope protocol
(plan 1569).
src/boot/sentry.ts wires it in. Capture paths:
- Vue component errors via
app.config.errorHandler, withcomponentName,lifecycleHookand shallowpropsDataattached. - Router errors,
windowerrorandunhandledrejectionlisteners. - HTTP 5xx responses from the ky client in
src/api/http.ts.
Chunk-load failures and other noise are filtered through ignoreErrors.
Each event carries breadcrumbs (fetch, console, clicks, navigation) and
contexts.trace.trace_id, one id per navigation. The same id goes out as
a W3C traceparent header on every /api request
(plan 2372),
which is meant to make the event searchable in Tempo; see
Debugging with traces for the
current verification status. No performance or span events are sent:
GlitchTip's Performance tab stays empty by design.
Configuring a deployment¶
Two env vars drive it, resolved at runtime in
src/config/runtime.ts:
| Variable | Purpose |
|---|---|
APP_SENTRY_DSN |
Project DSN. Empty/unset → Sentry init skipped. |
APP_ENVIRONMENT |
Event label (development, stage, production). |
⚠️ Empty DSN disables reporting.
helm/values.yamlshipsAPP_SENTRY_DSN: ""; the real DSN is set per cluster in the ops repo (enack8s-app-config/openshift-app-config), not here.
Set them per context:
- Production/stage: pod env via Helm
frontend.env, overridden in the ops repo. The same bundle ships everywhere; values are injected at container startup, not baked in. - Local dev: copy
frontend/.env.exampleto.env.localand fillAPP_SENTRY_DSN. - docker-compose: export
APP_SENTRY_DSNin your shell beforedocker compose up.
Under the pod's readOnlyRootFilesystem, these values are injected
at startup into /tmp/injectEnv.js and read from
window.injectedEnvVariable — see the
implementation plan
for the runtime-injection design.
Troubleshooting¶
- No events in GlitchTip: open the deployed app, load
/injectEnv.jsin the browser, and confirmAPP_SENTRY_DSNis a non-empty value. Empty → ops repo override is missing. - Stack traces are minified: known limitation. Source maps are
disabled (
sourcemap: false) to keep the bundle small; traces show line:column only. Reading minified frames is the current tradeoff.
Next step: to enable reporting on a new environment, request a GlitchTip project from nicdub, then add the DSN to that cluster's ops-repo values — do not commit it here.