Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
TraceEvent
Defined in the specialized module.
Rust AI Agent SDK
Trace event
Fields
| Name | Type | Description |
|---|
event_type | String | Event type |
timestamp | std::time::SystemTime | Event timestamp |
data | HashMap<String | Event data |
serde_json | :Value> | Event data |
trace_id | Option<String> | Trace ID |
span_id | Option<String> | Span ID |
parent_span_id | Option<String> | Parent span ID |
Methods
new
fn new(event_type: impl Into<String>) -> Self
Create a new trace event
Parameters:
| Name | Type |
|---|
event_type | impl Into<String> |
trace_id
fn trace_id(mut self, id: impl Into<String>) -> Self
Set trace ID
Parameters:
| Name | Type |
|---|
id | impl Into<String> |
span_id
fn span_id(mut self, id: impl Into<String>) -> Self
Set span ID
Parameters:
| Name | Type |
|---|
id | impl Into<String> |
data
fn data(mut self, key: impl Into<String>, value: serde_json::Value) -> Self
Add data
Parameters:
| Name | Type |
|---|
key | impl Into<String> |
value | serde_json::Value |
Source
View on GitHub
praisonai/src/parity/specialized.rs at line 514