Issue detection overview
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
| Detector | Runtime | Default | Report type | Page |
|---|---|---|---|---|
| Uncaught error or exception | Browser, Node.js, Bun | On | Crash | Errors and crashes |
| Unhandled promise rejection | Browser, Node.js, Bun | On | Error | Errors and crashes |
| Event-loop hang | Node.js, Bun | On | Error | Hangs |
| HTTP 5xx response | Browser, Node.js, Bun and the edge and worker runtimes | Off | Error | HTTP 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
errorandunhandledrejectionevents of the window, theuncaughtExceptionandunhandledRejectionevents of the process, a watchdog on the event loop, or the network capture. - Errors you report yourself are rate limited.
logExceptiondrops 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. Withpersist: falsein a browser, orcapturedDataStore: 'memory'withoutdataDiron 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
| Option | Type | Default | Description |
|---|---|---|---|
detectCrashes | boolean | true | Detect uncaught errors and unhandled rejections. |
detectHangs | boolean | true | Detect event-loop hangs. Node.js and Bun only. |
detectHttpErrors | boolean | false | Report 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.
Related pages
- Errors and crashes — uncaught errors and unhandled rejections
- Hangs — Node.js and Bun event-loop hangs
- HTTP errors — report failing backend calls
- Diagnostics — profiling, local variables and source context
- Backend overview — per-request context for server errors