pub enum GraphEvent {
RunStart {
run_id: String,
trace_id: String,
trace_ctx: Option<TraceCtx>,
graph_name: Option<String>,
},
RunEnd {
run_id: String,
trace_id: String,
trace_ctx: Option<TraceCtx>,
},
NodeStart {
run_id: String,
trace_id: String,
trace_ctx: Option<TraceCtx>,
node_id: String,
attempt: u32,
attempt_id: Option<AttemptId>,
trial_id: Option<TrialId>,
},
NodeEnd {
run_id: String,
trace_id: String,
trace_ctx: Option<TraceCtx>,
node_id: String,
outcome: NodeOutcomeKind,
attempt_id: Option<AttemptId>,
trial_id: Option<TrialId>,
},
Token {
run_id: String,
trace_id: String,
trace_ctx: Option<TraceCtx>,
node_id: String,
token: String,
},
CheckpointWritten {
run_id: String,
trace_id: String,
trace_ctx: Option<TraceCtx>,
checkpoint_attempt_id: String,
},
InterruptRaised {
run_id: String,
trace_id: String,
trace_ctx: Option<TraceCtx>,
node_id: String,
kind: String,
payload: Value,
},
StateUpdate {
run_id: String,
trace_id: String,
trace_ctx: Option<TraceCtx>,
node_id: String,
updates: HashMap<String, Value>,
},
SuperstepStart {
run_id: String,
trace_id: String,
trace_ctx: Option<TraceCtx>,
step: usize,
nodes: Vec<String>,
},
SuperstepEnd {
run_id: String,
trace_id: String,
trace_ctx: Option<TraceCtx>,
step: usize,
},
ParallelCancellation {
run_id: String,
trace_id: String,
trace_ctx: Option<TraceCtx>,
external_effects_may_have_escaped: bool,
},
}Expand description
Structured runtime event emitted during graph execution.
Every variant carries both legacy and canonical trace/retry fields:
trace_id: String— legacy correlation ID.trace_ctx: Option<stack_ids::TraceCtx>— canonical trace context.attempt: u32/attempt_id: Option<stack_ids::AttemptId>— retry family.trial_id: Option<stack_ids::TrialId>— individual execution trial (on variants representing a single execution attempt).
§Legacy field phase status: compatibility / migration-only
The trace_id: String and attempt: u32 fields use primitive types for
backward compatibility. The canonical replacements are stack_ids::TraceCtx,
stack_ids::AttemptId, and stack_ids::TrialId.
Removal condition: legacy fields removed when all event consumers migrate.
Variants§
RunStart
A graph run started.
Fields
RunEnd
A graph run ended.
Fields
NodeStart
A node execution attempt started.
Fields
trace_id: StringUse trace_ctx/attempt_id/trial_id instead. Will be removed when all consumers migrate.
Phase status: compatibility / migration-only.
Removal condition: all consumers migrate to trace_ctx/attempt_id/trial_id.
NodeEnd
A node execution attempt ended.
Fields
trace_id: StringUse trace_ctx/attempt_id/trial_id instead. Will be removed when all consumers migrate.
Phase status: compatibility / migration-only.
Removal condition: all consumers migrate to trace_ctx/attempt_id/trial_id.
outcome: NodeOutcomeKindToken
A streaming token from a payload node.
Fields
CheckpointWritten
A checkpoint was written.
Fields
InterruptRaised
An interrupt was raised by a node.
Fields
StateUpdate
State was updated by a node.
Fields
SuperstepStart
A parallel superstep started.
Fields
SuperstepEnd
A parallel superstep ended.
Fields
ParallelCancellation
Remaining parallel branches were cancelled after a sibling failed.
Trait Implementations§
Source§impl Clone for GraphEvent
impl Clone for GraphEvent
Source§fn clone(&self) -> GraphEvent
fn clone(&self) -> GraphEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more