pub struct RunTelemetry {
pub prompt_hash: String,
pub run_started_at: DateTime<Utc>,
pub run_ended_at: DateTime<Utc>,
pub duration_ms: u64,
pub total_iterations: u32,
pub total_tool_calls: u32,
pub tool_error_count: u32,
pub tools_used: Vec<String>,
pub total_prompt_tokens: u32,
pub total_completion_tokens: u32,
pub total_cost_usd: f64,
pub success: bool,
}Expand description
Structured telemetry summary for a completed run.
Derived from an ExecutionGraph via RunTelemetry::from_graph.
Fields§
§prompt_hash: StringHash of the system prompt and tool registry.
run_started_at: DateTime<Utc>When the run started.
run_ended_at: DateTime<Utc>When the run ended.
duration_ms: u64Total run duration in milliseconds.
total_iterations: u32Number of provider call iterations.
total_tool_calls: u32Total number of tool calls across all iterations.
tool_error_count: u32Number of tool calls that returned errors.
tools_used: Vec<String>Unique tool names, deduped in first-use order.
total_prompt_tokens: u32Total prompt tokens consumed.
total_completion_tokens: u32Total completion tokens consumed.
total_cost_usd: f64Total estimated cost in USD.
success: boolWhether the run completed successfully.
Implementations§
Source§impl RunTelemetry
impl RunTelemetry
Sourcepub fn from_graph(
graph: &ExecutionGraph,
run_ended_at: DateTime<Utc>,
success: bool,
total_cost_usd: f64,
) -> Self
pub fn from_graph( graph: &ExecutionGraph, run_ended_at: DateTime<Utc>, success: bool, total_cost_usd: f64, ) -> Self
Build a telemetry record from a completed ExecutionGraph.
Trait Implementations§
Source§impl Clone for RunTelemetry
impl Clone for RunTelemetry
Source§fn clone(&self) -> RunTelemetry
fn clone(&self) -> RunTelemetry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RunTelemetry
impl Debug for RunTelemetry
Source§impl<'de> Deserialize<'de> for RunTelemetry
impl<'de> Deserialize<'de> for RunTelemetry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RunTelemetry
impl RefUnwindSafe for RunTelemetry
impl Send for RunTelemetry
impl Sync for RunTelemetry
impl Unpin for RunTelemetry
impl UnsafeUnpin for RunTelemetry
impl UnwindSafe for RunTelemetry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more