Skip to content

Trace Export & Import

All moqtap tools share the .moqtrace file format — a binary format using CBOR encoding. It’s compact, streamable, and readable by any language with a CBOR library. The file starts with an 8-byte MOQTRACE magic header, followed by session metadata and a sequence of CBOR-encoded events.

Each event includes:

  • Timestamp (microseconds)
  • Direction
  • Parsed message fields
  • Raw bytes (for re-parsing)
  • Parse warnings (if any)
Terminal window
# Record intercept session to a .moqtrace file
moqtap intercept -u moqt://relay.example.com -o session.moqtrace

Click Export Trace during or after a session to save a .moqtrace file containing every event.

Click the export button in the DevTools panel to save the current session as a .moqtrace file.

Terminal window
# Replay a trace with text output
moqtap trace session.moqtrace
# JSON output
moqtap trace session.moqtrace --format json
# Hex dump mode
moqtap trace session.moqtrace --hex

Open a .moqtrace file via File > Open Trace. moqtap loads the entire timeline and switches to log analysis mode:

  • Full timeline scrubbing (forward/backward)
  • Search and filter across all events
  • No live interaction (read-only)
  • Latency displayed relative to first event

Import previously saved traces back into the extension for review in the DevTools panel.

.moqtrace files are self-contained — share them via email, Slack, or attach them to GitHub issues for bug reports. Traces captured in one moqtap tool can be opened in any other.

The @moqtap/trace library supports configurable detail levels:

LevelWhat’s captured
Control onlyControl messages, no data stream content
HeadersControl messages + data stream headers
Headers + sizesHeaders with payload sizes but no payload data
Headers + dataHeaders with full payload data
FullEverything including raw wire bytes