Overview
breadcrumbsIntegration records a breadcrumb for every:
- console call —
console.log/info/warn/error/debug, with the call's arguments indata.args; - http request — every outgoing
fetch()andnode:http/node:httpsrequest, 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
| Option | Type | Default | Description |
|---|---|---|---|
console | boolean | true | Breadcrumb per console.* call |
http | boolean | true | Breadcrumb 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.