Skip to main content

Module tracing

Module tracing 

Source
Expand description

Tracing — performance tracing via the browser-level CDP Tracing domain.

BrowserContext::tracing() returns a Tracing handle bound to the browser-level CDP session. Tracing::start begins a capture; Tracing::stop ends it and returns the full trace as JSON bytes (also written to path if one was recorded on start).

This mirrors Playwright’s context.tracing() shape, but speaks CDP directly: Tracing.start with transferMode: "ReturnAsStream", then on stop Tracing.end + the Tracing.tracingComplete event carries a stream handle, which we drain with IO.read until eof.

Structs§

Tracing
A performance tracing handle for a BrowserContext.