What should frontend observability capture beyond uncaught exceptions?
Combine errors, failed requests, performance, release context, user-impact signals, and privacy controls.
A bug report that says ‘the page broke’ gives an engineer very little to work with. Observability connects what happened in the browser to enough context to reproduce and diagnose it: errors, traces, timings and useful user-flow details. Error boundaries help contain some failures in the UI, while telemetry helps explain them after they happen.
A bug report that says ‘the page broke’ gives an engineer very little to work with. Observability connects what happened in the browser to enough context to reproduce and diagnose it: errors, traces, timings and useful user-flow details. Error boundaries help contain some failures in the UI, while telemetry helps explain them after they happen.
The quick version
Useful observability connects an error or degraded interaction to route, release, browser, network, and relevant application state—without collecting unnecessary personal data.
Build the mental model
Error boundaries catch certain rendering failures, not every async callback or event handler. Promise rejections and network failures need separate instrumentation. Sampling, source maps, deduplication, and release tagging determine whether telemetry is actionable.
See it in code
window.addEventListener('unhandledrejection', (event) => {
reportUnexpectedFailure(event.reason);
});
Where it gets tricky
Attach release identifiers and source maps so minified stack traces can be mapped to source. Redact credentials, personal data, and request bodies by default. Instrumentation itself must be isolated: a telemetry endpoint outage must not create another user-facing failure. Track expected aborts and validation rejections separately from unexpected defects.
A common misunderstanding
A global error listener is not a substitute for local recovery or explicit error states.
What this changes in an application
Define what is actionable, redact secrets, avoid high-cardinality payloads, and test that telemetry failures do not break the product.
Questions worth exploring next
- How do you distinguish expected aborts from defects?
- What should never be sent to telemetry?
References and next steps
- Error boundaries — primary or authoritative documentation for the underlying behavior.
- MDN Web Docs — use the relevant API reference for adjacent browser details.