One request / unit of work. Holds its spans and trace-level meta. Serialized to the exact ingest wire shape. Not part of any public API — instrumentation opens a trace on request start, accumulates spans, and closes it on request stop.
Structs are immutable, so the "active" trace lives in the process dictionary (a Phoenix/Plug request runs in one process) and every span append replaces it.
Summary
Functions
Append a span (kept in reverse; reversed on serialize).
Attach an exception + flag the trace as an error. Never throws.
Freeze the duration + memory delta when the trace closes.
Open a new trace. route/method may be refined later from telemetry.
Set a trace-level meta key.
Serialize to the ingest wire shape (string keys, camelCase).
Types
Functions
Append a span (kept in reverse; reversed on serialize).
Attach an exception + flag the trace as an error. Never throws.
Freeze the duration + memory delta when the trace closes.
Open a new trace. route/method may be refined later from telemetry.
Set a trace-level meta key.
Serialize to the ingest wire shape (string keys, camelCase).