Trace Export & Import
The .moqtrace format
Section titled “The .moqtrace format”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)
Recording traces
Section titled “Recording traces”# Record intercept session to a .moqtrace filemoqtap intercept -u moqt://relay.example.com -o session.moqtraceDesktop app
Section titled “Desktop app”Click Export Trace during or after a session to save a .moqtrace file containing every event.
Browser extension
Section titled “Browser extension”Click the export button in the DevTools panel to save the current session as a .moqtrace file.
Replaying traces
Section titled “Replaying traces”# Replay a trace with text outputmoqtap trace session.moqtrace
# JSON outputmoqtap trace session.moqtrace --format json
# Hex dump modemoqtap trace session.moqtrace --hexDesktop app
Section titled “Desktop app”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
Browser extension
Section titled “Browser extension”Import previously saved traces back into the extension for review in the DevTools panel.
Sharing traces
Section titled “Sharing traces”.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.
Detail levels
Section titled “Detail levels”The @moqtap/trace library supports configurable detail levels:
| Level | What’s captured |
|---|---|
| Control only | Control messages, no data stream content |
| Headers | Control messages + data stream headers |
| Headers + sizes | Headers with payload sizes but no payload data |
| Headers + data | Headers with full payload data |
| Full | Everything including raw wire bytes |