Skip to content

Overview ​

breadcrumbsIntegration records a breadcrumb for every:

  • console call — console.log/info/warn/error/debug, with the call's arguments in data.args;
  • http request — every outgoing fetch() and node:http / node:https request, with its method, URL and status.

The next exception captured carries the trail that led up to it. Breadcrumbs belong to the current async context: with HttpServerIntegration (or a withScope() per job), each request keeps its own trail, and one request's breadcrumbs never show up on another's error.

Usage ​

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

use(breadcrumbsIntegration())

// only outgoing requests:
use(breadcrumbsIntegration({ console: false }))

Options ​

OptionTypeDefaultDescription
consolebooleantrueBreadcrumb per console.* call
httpbooleantrueBreadcrumb per outgoing HTTP request

Unlike ConsoleIntegration, console calls here don't become log events of their own — they only show up as context on the next error. The two can be enabled together.