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, captured automatically.

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

Kinds

KindRecorded when
navigationA screen transition. UIKit is automatic; see Screen tracking.
tapThe user interacts with a control.
consoleYour app writes to stderr. See Console & network.
networkA request completes on a URLSession you built with networkCaptureConfiguration().
lifecycleThe app enters the background or returns to the foreground.
errorAn uncaught NSException. See Crash reporting.
customYou called addBreadcrumb.

Adding your own

TraceItX.shared.addBreadcrumb(
    message: "Coupon applied",
    kind: "custom",
    level: "info",
    data: ["code": "SUMMER25"]
)

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 an agent can filter on; message is prose, and prose is truncated first.

Thread safety

addBreadcrumb and recordScreen are safe to call from any thread — the buffer is lock-guarded internally. You do not need to hop to the main queue to record something that happened on a background one, and doing so would misorder the chain relative to what actually occurred.

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 that was on screen when it fired. seq breaks ties inside the same millisecond.

Uncaught exceptions

The SDK’s exception handler records an uncaught NSException as an error crumb and then hands the exception to whatever handler was installed before it. The chain lives in memory, so it does not outlive the process — native iOS files no unattended crash reports today. See Crash reporting.

Limits

Caps and trimming behaviour are in Errors & limits.