pub struct RuntimeTraceEvent {
pub id: String,
pub timestamp: String,
pub severity_number: u8,
pub severity_text: String,
pub event: EventDescriptor,
pub service: ServiceDescriptor,
pub trace_id: Option<String>,
pub span_id: Option<String>,
pub zeroclaw: ZeroclawAttribution,
pub message: Option<String>,
pub attributes: Value,
pub schema_version: u8,
}Expand description
One row in the canonical log stream.
Fields§
§id: StringPersistent event id. UUID v4.
timestamp: StringRFC 3339 UTC timestamp with milliseconds. Keyed @timestamp to
match ECS conventions; consumers (and our paginated reader) sort
by this lexicographically, which works because RFC 3339 is sortable
as a string.
severity_number: u8§severity_text: String§event: EventDescriptor§service: ServiceDescriptor§trace_id: Option<String>Per-turn trace identifier so multiple events from one agent turn group together in the UI. Hex string; populated by the agent loop at run() entry.
span_id: Option<String>Sub-span within a turn (e.g. one tool call inside a multi-tool iteration).
zeroclaw: ZeroclawAttributionAll the alias-bound attribution fields live here.
message: Option<String>Human-readable short message. The structured fields above carry the
machine-readable detail; message is what a terminal-formatter
prints as the line body.
attributes: ValueFree-form structured payload. Per-action contributors put extra
data here (tokens used, iteration counter, tool input/output
payloads when log_tool_io is enabled, anyhow error chain when
the event is an error, …).
schema_version: u8Schema version. 2 = this struct. Older files containing version-1
rows get migrated in place at daemon startup.
Implementations§
Source§impl LogEvent
impl LogEvent
pub const SCHEMA_VERSION: u8 = 2
Sourcepub fn new(
severity: Severity,
action: &str,
category: EventCategory,
) -> LogEvent
pub fn new( severity: Severity, action: &str, category: EventCategory, ) -> LogEvent
Build a fresh event with the given level + action + category. Caller fills in attribution and message before emission.
pub fn set_outcome(&mut self, outcome: EventOutcome)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LogEvent
impl<'de> Deserialize<'de> for LogEvent
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<LogEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LogEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for LogEvent
impl Serialize for LogEvent
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for LogEvent
impl RefUnwindSafe for LogEvent
impl Send for LogEvent
impl Sync for LogEvent
impl Unpin for LogEvent
impl UnsafeUnpin for LogEvent
impl UnwindSafe for LogEvent
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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