telemetry • AI Agent SDK
PraisonAI Agents Telemetry & Performance Monitoring Module
telemetry
AI Agent
PraisonAI Agents Telemetry & Performance Monitoring Module
This module provides:
- Anonymous usage tracking with privacy-first design
- User-friendly performance monitoring and analysis tools
Telemetry can be disabled via environment variables:
- PRAISONAI_TELEMETRY_DISABLED=true
- PRAISONAI_DISABLE_TELEMETRY=true
- DO_NOT_TRACK=true
Performance monitoring can be optimized via environment variables:
- PRAISONAI_PERFORMANCE_DISABLED=true (disables performance monitoring overhead)
- PRAISONAI_FLOW_ANALYSIS_ENABLED=true (enables expensive flow analysis – opt-in only)
No personal data, prompts, or responses are collected.
Performance Monitoring Features:
- Function performance tracking with detailed statistics
- API call monitoring and analysis
- Function execution flow visualization (opt-in)
- Performance bottleneck identification
- Real-time performance reporting
- External APM metrics export (DataDog, New Relic compatible)
- CLI interface for easy access
Import
from praisonaiagents import telemetryFunctions
get_telemetry()
Get the global telemetry instance.
enable_telemetry()Enable telemetry (if not disabled by environment).
disable_telemetry()Disable telemetry.
force_shutdown_telemetry()Force shutdown of telemetry system with comprehensive cleanup.
enable_performance_mode()Enable performance mode for minimal telemetry overhead.
disable_performance_mode()Disable performance mode to resume full telemetry tracking.
cleanup_telemetry_resources()Clean up telemetry resources including thread pools and queues.
Constants
| Name | Value |
|---|---|
_PERFORMANCE_EXPORTS | {'PerformanceMonitor': 'performance_monitor', 'performance_monitor': 'performance_monitor', 'monitor_function': 'performance_monitor', 'track_api_call': 'performance_monitor', 'get_performance_report'... |