Skip to content
TraceItX Docs
Documentation

Breadcrumbs

The trail that led to the bug: screens, taps, console, network and errors, on one clock.

Updated

Every report carries a single chronological chain. Lifecycle, tap and native log entries are automatic; console and navigation are integrations you add (see Console and Screen tracking); custom entries are yours.

{
  "t": 1765800000123,
  "seq": 42,
  "kind": "network",
  "level": "error",
  "message": "POST /api/cart",
  "data": {
    "reqId": 17,
    "status": 500
  }
}

Kinds

KindRecorded when
navigationA screen transition — only once wired.
tapThe user touches the screen. Captured at the window level, so React Native touchables count.
consoleYour JS logs — only with the console integration added.
networkNot captured on React Native — see Console & network.
lifecycleThe app backgrounds, foregrounds, or resumes.
errorA native exception below the bridge. An uncaught JS error becomes a report instead — see Crash reporting.
customYou called addBreadcrumb.

Adding your own

const { addBreadcrumb } = useTraceItX();

addBreadcrumb({
  message: 'Coupon applied',
  kind: 'custom',
  level: 'info',
  data: { code: 'SUMMER25', discount: 0.25 },
});

addBreadcrumb never throws. An unknown kind coerces to custom and an invalid level is dropped rather than passed through — instrumentation must not be able to break the app it is instrumenting.

Put identifiers in data, not in message. data survives as structured fields; message is prose, and prose is truncated first.

Crossing the bridge

Crumbs added from JS are forwarded to the native buffer, which is where the chain actually lives — the same buffer the crash reporter reads when it builds an unattended report. That is why such a report still carries the trail that led to it.

The cost is that a crumb added in the same tick as a hard crash may not make the crossing. Rare, and the alternative — keeping the chain in JS — loses the whole trail on every native crash instead of the last entry on some.

The shared clock

t is absolute epoch milliseconds, on the same clock as the session replay, so a viewer can line a crumb up against the frame on screen when it fired. seq breaks ties inside the same millisecond.

Limits

Caps and trimming behaviour are in Errors & limits.