Log bundle format
The JSON format of the logs attached to every Midge report, for developers who read or process them.
The Chrome extension and the website SDK upload one log bundle per recording as the logs file:
gzip-compressed JSON, Content-Type: application/gzip, at most 50 MiB compressed and
200 MB uncompressed. Everything in it has already been redacted in the browser; the server never sees the raw values.
t is milliseconds since the recording (or the instant replay window) started. Entries are
in time order. Unknown fields are ignored, so new fields can be added without a version bump;
changing or removing a field needs "version": 2.
{
"version": 1,
"startedAt": "2026-11-10T09:00:00.000Z",
"durationMs": 61000,
"device": {
"os": "macOS 15", "browser": "Chrome 142", "viewport": "1512x806",
"language": "en-US", "timezone": "Europe/Istanbul", "connection": "4g"
},
"console": [
{ "t": 15000, "level": "error", "text": "TypeError: cart.total is undefined", "stack": "…" }
],
"network": [
{
"t": 14800, "method": "POST", "url": "https://shop.example/api/checkout",
"status": 500, "type": "fetch", "durationMs": 300,
"requestHeaders": [["content-type", "application/json"]],
"responseHeaders": [["content-type", "application/json"]],
"requestBody": "{\"password\":\"[REDACTED]\"}", "responseBody": "{\"error\":\"…\"}"
}
],
"websocket": [
{ "t": 15500, "url": "wss://shop.example/live", "direction": "received", "data": "{\"type\":\"cart\"}" }
],
"actions": [
{ "t": 5000, "kind": "click", "selector": "button#checkout", "text": "Checkout" },
{ "t": 9000, "kind": "input", "selector": "input[name=email]" }
],
"navigations": [
{ "t": 300, "url": "https://shop.example/cart", "title": "Cart" }
],
"metadata": { "userId": "u_42", "plan": "pro" },
"source": "sdk"
}
| Field | Values |
|---|---|
console[].level | log, info, warn, error, debug (uncaught errors and unhandled rejections are error) |
network[].type | fetch, xhr, ws, js, css, img, media, font, doc, other |
network[].status | HTTP status; 0 when the request failed before a response |
websocket[].direction | sent, received (text messages; binary frames are written as [binary N bytes]) |
actions[].kind | click, input (never the value), navigation, scroll, tab |
metadata | What the site set with Midge.metadata() (website SDK), redacted; missing when it set nothing |
source | sdk when the website SDK wrote it; missing from the extension |
What the server derives (backend/apps/recordings/logbundle.py):
- Chapters: one per entry in
navigations. The first starts at 0. Consecutive loads of the same URL merge. An empty title falls back to the URL path. - Counts:
console_errorscountslevel == "error".failed_requestscountsstatus == 0orstatus >= 400. - Search: the distinct page titles, in order.
A broken bundle doesn’t fail the recording: the video or screenshot still becomes ready, and
error says what was wrong with the logs.
Instant replay file (replay role)
A gzip-compressed JSON object, uploaded next to the log bundle of the same window:
| Field | Type | Meaning |
|---|---|---|
version | 1 | Format version. |
startedAt | ISO 8601 | Time of the first event (a full DOM snapshot). |
events | array | rrweb events (@rrweb/record 2.x), starting with a Meta (type 4) and a FullSnapshot (type 2) event. |
Every input value is masked (* per character, hidden inputs included), text typed into editable
elements is masked completely, and every other text node and attribute value (links, data-*,
meta content) has passed the secret, email and phone rules before it left the browser. The log
bundle’s startedAt equals the replay’s.