Skip to main content

TraceEvent

Defined in the specialized module.
Rust AI Agent SDK Trace event

Fields

NameTypeDescription
event_typeStringEvent type
timestampstd::time::SystemTimeEvent timestamp
dataHashMap<StringEvent data
serde_json:Value>Event data
trace_idOption<String>Trace ID
span_idOption<String>Span ID
parent_span_idOption<String>Parent span ID

Methods

new

fn new(event_type: impl Into<String>) -> Self
Create a new trace event Parameters:
NameType
event_typeimpl Into&lt;String&gt;

trace_id

fn trace_id(mut self, id: impl Into<String>) -> Self
Set trace ID Parameters:
NameType
idimpl Into&lt;String&gt;

span_id

fn span_id(mut self, id: impl Into<String>) -> Self
Set span ID Parameters:
NameType
idimpl Into&lt;String&gt;

data

fn data(mut self, key: impl Into<String>, value: serde_json::Value) -> Self
Add data Parameters:
NameType
keyimpl Into&lt;String&gt;
valueserde_json::Value

Source

View on GitHub

praisonai/src/parity/specialized.rs at line 514