Skip to content

Overview ​

breadcrumbsIntegration builds the breadcrumb trail for you, so every captured exception arrives with a record of what the user and the app were doing right before it. It collects five independent sources:

SourceBreadcrumb typeWhat's recorded
consoleconsoleEvery console.log/info/warn/error/debug call, with its arguments
dominteractionClicks and key presses, with a short selector path to the target element and its accessible label
fetchfetchMethod, URL and status of each fetch() request (error level on failure or non-2xx)
xhrxhrSame, for XMLHttpRequest
historynavigationSPA navigations (pushState and back/forward), with from and to URLs

The SDK's own requests to /api/envelope are skipped, so they never clutter the trail. See Breadcrumbs for how the trail is stored and shown on the dashboard.

Usage ​

ts
import { use } from '@buglapse/browser'
import { breadcrumbsIntegration } from '@buglapse/browser/integrations'

use(breadcrumbsIntegration())

// or turn individual sources off:
use(breadcrumbsIntegration({ console: false, xhr: false }))

Options ​

OptionTypeDefaultDescription
consolebooleantrueRecord console calls
dombooleantrueRecord clicks and key presses
fetchbooleantrueRecord fetch() requests
xhrbooleantrueRecord XMLHttpRequest requests
historybooleantrueRecord SPA navigations

Console breadcrumbs and ConsoleIntegration can be enabled together — one adds a breadcrumb per call, the other sends a log event per call.