#[non_exhaustive]pub struct TraceStep {
pub workflow: WorkflowIx,
pub workflow_id: Arc<str>,
pub task: Option<TaskIx>,
pub task_id: Option<Arc<str>>,
pub result: StepResult,
pub status: Option<u16>,
pub changes: Vec<Change>,
pub mapping_ends: Vec<u32>,
pub errors: Vec<ErrorRecord>,
pub elapsed: Option<Duration>,
pub loop_counter: Option<i64>,
pub element_index: Option<usize>,
}Expand description
One step of a Trace.
Written with its keys in this order. mapping_ends and errors are
absent when empty, and elapsed_us (in whole microseconds),
loop_counter and element_index when there is none.
Read back from what it writes: elapsed_us as the whole microseconds
written, and an absent mapping_ends or errors as empty.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.workflow: WorkflowIxThe workflow’s position in the program.
workflow_id: Arc<str>The workflow’s id.
task: Option<TaskIx>The task’s position in the program; null for the workflow’s own
step: its skip, its failure, or the engine’s writes as a sweep is
entered.
task_id: Option<Arc<str>>The task’s id; null when task is.
result: StepResultWhat the step was.
status: Option<u16>The call’s status; null for a skip, a call whose outcome was a
skip, and the engine’s step.
changes: Vec<Change>The step’s changes in order: the engine’s writes made for it first (a
fan-out’s into pre-fill), then the call’s own, then the progress
write, then the error context’s. Empty past the byte budget and when
the trace records none.
mapping_ends: Vec<u32>Where each of a map’s mappings ends in changes: one entry per
mapping, in order, the index just past its last change, so mapping
i’s changes run from the end before it (0 for the first) up to its
own. A mapping that wrote nothing repeats the end before it.
Replaying the changes before mapping i’s end gives the context
after mapping i. Empty for every other step, and whenever changes
is.
errors: Vec<ErrorRecord>Every record the step added to the message, in the message’s order:
the call’s own, then the engine’s; for a workflow’s own failure, its
record. A workflow whose condition failed to evaluate adds none to
the message, and its skipped step holds that failure’s record.
elapsed: Option<Duration>How long the call ran, written in whole microseconds, when the trace asked for timings.
loop_counter: Option<i64>The loop counter of the sweep: the call’s, or the one the engine’s step wrote.
element_index: Option<usize>The fan-out element the call ran for.