Skip to main content

Issue detection overview

Beta

This page documents the Bugsee JavaScript SDK, which is in beta (0.1.x) and can change between betas.

Issue detection files a report without any code from you. When a detector fires, Bugsee assembles a bundle of the recent logs, network calls, breadcrumbs and (in a browser) the session replay, and uploads it.

What it detects​

DetectorRuntimeDefaultReport typePage
Uncaught error or exceptionBrowser, Node.js, BunOnCrashErrors and crashes
Unhandled promise rejectionBrowser, Node.js, BunOnErrorErrors and crashes
Event-loop hangNode.js, BunOnErrorHangs
HTTP 5xx responseBrowser, Node.js, Bun and the edge and worker runtimesOffErrorHTTP errors

A crash is something that ended or would have ended the process or page. An error is a problem the app survived. The two have separate default priorities: reportDefaultCrashPriority is blocker and reportDefaultErrorPriority is high.

Errors you catch and report yourself with logException go through the same pipeline. See Crash and error reporting.

How it works​

  • Detectors are providers. Each one watches a source: the error and unhandledrejection events of the window, the uncaughtException and unhandledRejection events of the process, a watchdog on the event loop, or the network capture.
  • Errors you report yourself are rate limited. logException drops the same thrown object when it is reported twice, and accepts at most 100 calls in any 60-second window. HTTP errors have their own limits, described on their page.
  • Reports are delivered durably. On Node.js and Bun, and in a browser with IndexedDB and Web Locks, a report is stored before it is uploaded (recover, on by default), and a report left behind by a process that was killed is uploaded on the next launch. With persist: false in a browser, or capturedDataStore: 'memory' without dataDir on Node.js and Bun, reports stay in memory and are not recovered. See Cleanup.
  • Stack traces are symbolicated. Minified frames are mapped back to your source when you upload source maps. See Symbolication.

Switches​

OptionTypeDefaultDescription
detectCrashesbooleantrueDetect uncaught errors and unhandled rejections.
detectHangsbooleantrueDetect event-loop hangs. Node.js and Bun only.
detectHttpErrorsbooleanfalseReport HTTP 5xx responses.
import { launch } from '@bugsee/bugsee';

launch('<your_app_token>', {
detectCrashes: true,
detectHangs: true,
detectHttpErrors: true,
});

On a server, the diagnostics options add local variables, source lines and a CPU profile to what these detectors report.

Found an issue, typo, or wrong statement on this page? Report it now →