Both are captured from the moment init() runs. Both are rolling buffers —
you get the entries leading up to the report, not the whole session.
Console
init({
apiKey: 'txx_live_…',
console: { maxEntries: 100, levels: ['warn', 'error'] },
});
| Option | Default | Notes |
|---|---|---|
console.maxEntries | 100 | Ring-buffer capacity. |
console.levels | all five | log, info, warn, error, debug. |
Narrowing levels is the cheapest way to cut report size on a chatty app —
['warn', 'error'] usually keeps everything a triager wants and drops most of
the volume.
Network
init({ apiKey: 'txx_live_…', network: { maxEntries: 100 } });
fetch and XMLHttpRequest are both captured, as metadata: method, URL, status
and timing. Bodies are separate and off by default — see
Network bodies.
The patchers are page-global
console, fetch, XMLHttpRequest and the History API are patched once per
page behind a marker, and shared with anything else on the page. They survive
destroy() deliberately: the next init() re-claims them, so they neither
accumulate across a client-side-routing app’s lifecycle nor keep feeding a torn-
down client.
One consequence worth knowing: if your app also wraps fetch, patch order
decides what gets recorded. Wrap before init() and the SDK records the request
as your wrapper rewrote it — the one that actually went on the wire. Wrap after,
and the SDK records it as your app originally called it. Neither is wrong; they
answer different questions, so pick the one that matches what you debug from.
How they reach the envelope
Both land as breadcrumbs, with kind: "console" and
kind: "network", on the shared clock. The envelope also carries payload.logs
and payload.network arrays, but those are deprecated — derived from the
breadcrumb chain during the deprecation window so older receivers keep working.
Read payload.breadcrumbs and filter by kind. It is the only way to see console
and network interleaved with clicks and navigation on one timeline.
Redaction
Both streams pass through the redaction engine before they are buffered, not before they are sent. A token in a query string never reaches the buffer, so it cannot be recovered from a report even by us.