Skip to main content

telemetry

AI Agent PraisonAI Agents Telemetry & Performance Monitoring Module This module provides:
  1. Anonymous usage tracking with privacy-first design
  2. 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 telemetry

Functions

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.