Skip to content
midgeDocs
ReferenceLog bundle format
Reference

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.

json
{
  "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"
}
FieldValues
console[].levellog, info, warn, error, debug (uncaught errors and unhandled rejections are error)
network[].typefetch, xhr, ws, js, css, img, media, font, doc, other
network[].statusHTTP status; 0 when the request failed before a response
websocket[].directionsent, received (text messages; binary frames are written as [binary N bytes])
actions[].kindclick, input (never the value), navigation, scroll, tab
metadataWhat the site set with Midge.metadata() (website SDK), redacted; missing when it set nothing
sourcesdk 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_errors counts level == "error". failed_requests counts status == 0 or status >= 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:

FieldTypeMeaning
version1Format version.
startedAtISO 8601Time of the first event (a full DOM snapshot).
eventsarrayrrweb 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.