Replay console and network capture
Opt in to console output and network requests inside a session replay so developers can debug what a user saw. Off by default; credentials are always redacted.
A replay can show the page's console output and its fetch/XHR requests next to the timeline. Both are off by default and configured in the browser SDK. They are context inside the recording, not analytics events and not error tracking: errors, traces and performance monitoring stay in Watchtower.
init("lc_pk_...", {
apiHost,
replay: {
console: true, // log, info, warn, error, debug + uncaught errors and unhandled rejections
network: {
headers: false, // default false
body: false, // default false
deny: ["/health", /analytics\.example\.com/], // never recorded (string = substring)
allow: ["/api/"], // when set, only matching URLs are recorded
redact: (req) => (req.url.includes("/admin") ? null : req), // last look; return null to drop
},
},
});network: false (the default) records no requests.
What is recorded
Console: the level and the arguments as text (cycles and DOM nodes are summarised, each argument is cut at 1 000 characters, at most 1 000 entries per recording). Uncaught errors and unhandled promise rejections appear as
errorentries.Network: URL (with your
urlPrivacyrules applied), method, status (0 when no response arrived), start, duration and size. Headers and bodies only whenheaders/bodyaretrue; bodies are cut at 4 KB.
Always redacted
Headers
Authorization,Proxy-Authorization,Cookie,Set-Cookie,X-Api-Key,X-Auth-Token,X-CSRF-Token.JSON and form fields whose name looks like a password, secret, token, API key, card number, CVV or SSN.
Binary bodies (files, blobs) are never stored.
The SDK's own requests to
<apiHost>/v1/are never recorded.
Console text is withheld (the level is kept) on pages with text masking (mask_all_text or a URL privacy rule that masks all text). Nothing is recorded while recording is paused, on excluded URLs, or without consent.
In the player and the list
The player adds a Console and network panel. Click a row to seek to it; filter console by level and requests by status class (2xx, 3xx, 4xx, 5xx, failed). A request opens a detail view, which shows headers and bodies only if they were captured.
The replay list has Has console error and Has 5xx request filters (has_console_error, has_network_5xx in POST /v1/projects/{id}/replays/search). Rows carry console_error_count, network_error_count, has_console_error and has_network_5xx. Recordings made before you turned the options on have no counts and match "No".