Telemetry Context • Rust AI Agent SDK
TelemetryContext: Telemetry context for scoped tracking
TelemetryContext
Defined in the Telemetry Funcs module.
Rust AI Agent SDK
Telemetry context for scoped tracking
Fields
| Name | Type | Description |
|---|---|---|
name | String | Context name |
start_time | std::time::Instant | Start time |
properties | std::collections::HashMap<String | Properties |
serde_json | :Value> | Properties |
Methods
new
fn new(name: impl Into<String>) -> SelfCreate a new telemetry context
Parameters:
| Name | Type |
|---|---|
name | impl Into<String> |
property
fn property(mut self, key: impl Into<String>, value: serde_json::Value) -> SelfAdd a property
Parameters:
| Name | Type |
|---|---|
key | impl Into<String> |
value | serde_json::Value |
elapsed_ms
fn elapsed_ms(&self) -> u64Get elapsed time in milliseconds
complete
fn complete(self) -> ()Complete the context and track event
Source
View on GitHubpraisonai/src/parity/telemetry_funcs.rs at line 256