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.
TelemetryEvent
Defined in the telemetry module.
Rust AI Agent SDK
A telemetry event.
Fields
| Name | Type | Description |
|---|
event_type | TelemetryEventType | Event type |
timestamp | chrono::DateTime<chrono::Utc> | Timestamp |
data | HashMap<String | Event data |
serde_json | :Value> | Event data |
duration | Option<Duration> | Duration (if applicable) |
Methods
new
fn new(event_type: TelemetryEventType) -> Self
Create a new event.
Parameters:
| Name | Type |
|---|
event_type | TelemetryEventType |
with_data
fn with_data(mut self, key: impl Into<String>, value: impl Serialize) -> Self
Add data.
Parameters:
| Name | Type |
|---|
key | impl Into<String> |
value | impl Serialize |
with_duration
fn with_duration(mut self, duration: Duration) -> Self
Set duration.
Parameters:
Source
View on GitHub
praisonai/src/telemetry/mod.rs at line 337