pub struct ExecutorEvent {
pub execution_id: i64,
pub event_type: String,
pub step: String,
pub status: String,
pub created_at: DateTime<Utc>,
pub context: Value,
pub event_id: Option<i64>,
pub worker_id: Option<String>,
pub meta: Option<Value>,
}Expand description
One event the executor emits. Keep field naming aligned with the
Python side (noetl.event table columns) so envelopes can be
projected by either stack.
R-1.2 PR-2a: execution_id is now i64 (matching the Python
noetl.event.execution_id bigint column, the CLI’s
BridgeContext.execution_id, the worker’s
CommandNotification.execution_id, and
noetl_tools::context::ExecutionContext.execution_id).
R-1.2 PR-EE-1 (0.3.1): adds the optional fields the Python
EventEmitRequest (and the Rust noetl-server EventRequest)
already expect — event_id, worker_id, meta. All are
Option + #[serde(default, skip_serializing_if = "Option::is_none")] so older wire-format consumers deserialize
cleanly and producers that don’t populate them omit them from
the JSON entirely. This step is the additive prerequisite for
the cross-repo event envelope reconciliation tracked on
noetl/ai-meta#30.
Fields§
§execution_id: i64Execution this event belongs to. Matches the
noetl.event.execution_id bigint column.
event_type: StringEvent type (e.g. "step.enter", "call.done",
"step.exit", "command.completed", "command.failed").
Python side uses an EventType enum but Rust accepts the
raw string; the server validates against the enum when
projecting.
step: StringStep name (node_id / node_name in the Python projector).
status: StringLifecycle status (e.g. "STARTED", "COMPLETED",
"FAILED").
created_at: DateTime<Utc>Wall-clock when the event was produced. Stamped at emit time so the event log preserves per-component ordering even across server-clock skew.
context: ValueFree-form payload; the projector reads typed fields out
of this. Renamed from the worker’s payload field to
match the Python EventEmitRequest.context field; serde
alias accepts either name on the wire.
event_id: Option<i64>Application-side snowflake id for this event. Per
agents/rules/observability.md Principle 3,
the emitting process generates this BEFORE the row hits
the database so spans / metrics / cross-component
correlation can use it immediately. None falls back to
the DB-side default (existing gen_snowflake() function).
worker_id: Option<String>Worker that emitted the event (worker pod’s id, or
"cli-local" for CLI mode). Used for shard-aware queries
- diagnostic correlation.
meta: Option<Value>Free-form metadata that doesn’t belong in context —
retry counts, parent-event refs, catalog ids. Matches the
Python EventEmitRequest.meta field 1:1.
Trait Implementations§
Source§impl Clone for ExecutorEvent
impl Clone for ExecutorEvent
Source§fn clone(&self) -> ExecutorEvent
fn clone(&self) -> ExecutorEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExecutorEvent
impl Debug for ExecutorEvent
Source§impl<'de> Deserialize<'de> for ExecutorEvent
impl<'de> Deserialize<'de> for ExecutorEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ExecutorEvent
impl RefUnwindSafe for ExecutorEvent
impl Send for ExecutorEvent
impl Sync for ExecutorEvent
impl Unpin for ExecutorEvent
impl UnsafeUnpin for ExecutorEvent
impl UnwindSafe for ExecutorEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more