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.
MinimalTelemetry
Defined in the Telemetry Funcs module.
Rust AI Agent SDK
Minimal telemetry implementation Provides basic telemetry functionality with minimal overhead. When performance mode is enabled, telemetry operations are no-ops.
Fields
Name Type Description enabledboolWhether telemetry is enabled session_idStringSession ID for correlation user_idOption<String>User ID (optional) propertiesstd::collections::HashMap<StringAdditional properties serde_json:Value>Additional properties
Methods
new
Create a new minimal telemetry instance
with_session_id
fn with_session_id ( session_id : impl Into < String >) -> Self
Create with specific session ID
Parameters:
Name Type session_idimpl Into<String>
set_user_id
fn set_user_id ( &mut self , user_id : impl Into < String >) -> ()
Set user ID
Parameters:
Name Type user_idimpl Into<String>
session_id
fn session_id ( & self ) -> & str
Get session ID
user_id
fn user_id ( & self ) -> Option < & str >
Get user ID
is_enabled
fn is_enabled ( & self ) -> bool
Check if telemetry is enabled
enable
fn enable ( &mut self ) -> ()
Enable telemetry
disable
fn disable ( &mut self ) -> ()
Disable telemetry
set_property
fn set_property ( &mut self , key : impl Into < String >, value : serde_json :: Value ) -> ()
Set a property
Parameters:
Name Type keyimpl Into<String>valueserde_json::Value
get_property
fn get_property ( & self , key : & str ) -> Option < & serde_json :: Value >
Get a property
Parameters:
track_event
fn track_event ( & self , event_name : & str , properties : Option < & serde_json :: Value >) -> ()
Track an event (no-op if disabled or in performance mode)
Parameters:
Name Type event_name&strpropertiesOption<&serde_json::Value>
track_agent_start
fn track_agent_start ( & self , agent_name : & str , model : & str ) -> ()
Track agent start
Parameters:
Name Type agent_name&strmodel&str
track_agent_complete
fn track_agent_complete ( & self , agent_name : & str , duration_ms : u64 ) -> ()
Track agent completion
Parameters:
Name Type agent_name&strduration_msu64
fn track_tool_execution ( & self , tool_name : & str , success : bool , duration_ms : u64 ) -> ()
Track tool execution
Parameters:
Name Type tool_name&strsuccessboolduration_msu64
track_llm_call
fn track_llm_call (
& self ,
model : & str ,
input_tokens : Option < u32 >,
output_tokens : Option < u32 >,
duration_ms : u64 ,
) -> ()
Track LLM call
Parameters:
Name Type model&strinput_tokensOption<u32>output_tokensOption<u32>duration_msu64
track_error
fn track_error ( & self , error_type : & str , error_message : & str ) -> ()
Track error
Parameters:
Name Type error_type&strerror_message&str
flush
Flush any pending events
cleanup
Cleanup resources
Source
View on GitHub praisonai/src/parity/telemetry_funcs.rs at line 29