Expand description
Durable diagnostics for the lash runtime: the TraceSink channel and its
record vocabulary.
A TraceSink receives one TraceRecord per runtime event — session and
turn lifecycle, prompt builds, LLM calls, per-tool start/completion, token
usage, protocol steps, and Lashlang execution-graph updates. Each record
carries a TraceContext (session / turn / graph-node identity) plus a
tagged TraceEvent payload; TraceEvent::kind is the single source of
truth for the type tag string that consumers match on.
JsonlTraceSink writes one JSON line per record at schema
TRACE_SCHEMA_VERSION; TeeTraceSink fans out to several sinks; and the
optional otel feature adds an OtelTraceSink that converts each record to
an OpenTelemetry span. This is the durable diagnostics reporting channel —
distinct from the app-facing TurnActivity stream and the low-level
SessionEvent stream that the runtime crates expose.
For the full map of reporting channels, guidance on when to consume which,
and the schema-evolution policy that governs TRACE_SCHEMA_VERSION, see
docs/reporting.html; for the attach-a-sink how-to, see docs/tracing.html.
Structs§
- Jsonl
Trace Sink - Stderr
Trace Sink - Writes each trace record as one JSON line to stderr — handy for
cargo rundebugging without a trace file. - TeeTrace
Sink - Fans each trace record out to several sinks in order (e.g. stderr + a JSONL file). Stops at the first sink that errors.
- Trace
Agent Frame Switch - Trace
Attachment - Trace
Context - Trace
Error - Trace
Label Metadata - Trace
Lashlang Child Execution - Trace
Lashlang Execution Identity - Trace
Lashlang Graph - Trace-derived Lashlang execution graph snapshot for hosts and debugging tools.
- Trace
Lashlang Graph Child Link - Link from an observed parent Lashlang node to a child execution graph.
- Trace
Lashlang Graph Edge - Trace-derived Lashlang graph edge.
- Trace
Lashlang Graph Node - Trace-derived Lashlang graph node.
- Trace
Lashlang Graph Store - In-memory store that reduces Lashlang execution trace records into graph snapshots.
- Trace
Lashlang Map - Trace
Lashlang MapEdge - Trace
Lashlang MapNode - Trace
LlmMessage - Trace
LlmRequest - Trace
LlmResponse - Trace
Prompt Component - Trace
Provider Stream Event - Trace
Record - Trace
Runtime Scope - Trace
Runtime Stream Event - Trace
Token Usage - Trace
Tool Call Output - Trace
Tool Spec
Enums§
- Trace
Branch Selection - Trace
Content Block - Trace
Event - Trace
Lashlang Edge Selection - Observed branch-edge selection state.
- Trace
Lashlang Execution Event - Trace
Lashlang Node Status - Observed Lashlang graph node state.
- Trace
Lashlang Status - Trace
Level - Trace
Runtime Subject - Trace
Sink Error - Trace
Tool Call Outcome - Trace
Tool Call Status
Constants§
- TRACE_
SCHEMA_ VERSION - Version of the durable trace JSONL schema, written to
TraceRecord::schema_versionon every record.