Trace Event • Rust AI Agent SDK

TraceEvent: Trace event

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

rust
fn new(event_type: impl Into<String>) -> Self

Create a new trace event

Parameters:

NameType
event_typeimpl Into&lt;String&gt;

trace_id

rust
fn trace_id(mut self, id: impl Into<String>) -> Self

Set trace ID

Parameters:

NameType
idimpl Into&lt;String&gt;

span_id

rust
fn span_id(mut self, id: impl Into<String>) -> Self

Set span ID

Parameters:

NameType
idimpl Into&lt;String&gt;

data

rust
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


Related Documentation