Skip to main content

Module trace

Module trace 

Source
Expand description

bynk dev --trace-events (#3580): the per-request trace a traced Worker prints, and the request event bynk dev makes of it.

A traced Worker prints one __bynk_trace: line per request (the trace runtime module). The driver recognises it before the frame rewriter sees the line, parses it, maps the fault’s stack frames to .bynk locations, and emits a crate::dev::DevEvent::Request. A line that carries the prefix but does not parse is left to the ordinary output, so nothing is lost.

Structs§

RawTrace
The line as the Worker printed it.
TraceFault
A request’s fault: the error’s first line and its stack frames, with frames into generated code rewritten to .bynk locations.
TraceSpan
The .bynk call site a step came from.
TraceStep
One recorded step of a request: what it called and how it went. It carries no argument values.

Constants§

TRACE_PREFIX
The prefix a traced Worker puts on its trace line.

Functions§

fault
A fault’s stack as a TraceFault, each frame passed through rewrite.
parse
Parse a trace line, or None when it is not one or is malformed.
trace_json
The trace JSON on line, when it carries the prefix (anywhere in the line, as a host may put its own text before it).