Skip to main content

TelemetryEvent

Defined in the telemetry module.
Rust AI Agent SDK A telemetry event.

Fields

NameTypeDescription
event_typeTelemetryEventTypeEvent type
timestampchrono::DateTime<chrono::Utc>Timestamp
dataHashMap<StringEvent data
serde_json:Value>Event data
durationOption<Duration>Duration (if applicable)

Methods

new

fn new(event_type: TelemetryEventType) -> Self
Create a new event. Parameters:
NameType
event_typeTelemetryEventType

with_data

fn with_data(mut self, key: impl Into<String>, value: impl Serialize) -> Self
Add data. Parameters:
NameType
keyimpl Into&lt;String&gt;
valueimpl Serialize

with_duration

fn with_duration(mut self, duration: Duration) -> Self
Set duration. Parameters:
NameType
durationDuration

Source

View on GitHub

praisonai/src/telemetry/mod.rs at line 337