{"id":2544,"library":"iterative-telemetry","title":"Iterative Telemetry","description":"Iterative Telemetry is a common Python library used for sending anonymized usage telemetry. It can be disabled via an environment variable and collects a minimal amount of anonymized data to understand tool usage. The current version is 0.0.10, with patch-level releases occurring periodically.","status":"active","version":"0.0.10","language":"en","source_language":"en","source_url":"https://github.com/iterative/telemetry-python","tags":["telemetry","observability","data science","mlops","dvc"],"install":[{"cmd":"pip install iterative-telemetry","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Requires Python 3.8 or higher.","package":"python","optional":false}],"imports":[{"symbol":"IterativeTelemetryLogger","correct":"from iterative_telemetry.logger import IterativeTelemetryLogger"}],"quickstart":{"code":"import os\nfrom iterative_telemetry.logger import IterativeTelemetryLogger\n\n# Instantiate the logger with your tool's name\n# Telemetry can be disabled by setting ITERATIVE_DO_NOT_TRACK=1 in environment variables\nlogger = IterativeTelemetryLogger(tool_name=\"my_awesome_tool\")\n\n# Send a simple event\nlogger.send_event(\"tool_started\", {\"version\": \"1.0.0\", \"mode\": \"cli\"})\n\n# Send an event only once per user/tool instance (e.g., for first-time setup)\nlogger.send_event_once(\"first_run_event\")\n\nprint(\"Telemetry events sent (or skipped if ITERATIVE_DO_NOT_TRACK is set).\")","lang":"python","description":"Initialize the IterativeTelemetryLogger with your tool's name and send custom events. Telemetry can be globally disabled by setting the `ITERATIVE_DO_NOT_TRACK=1` environment variable."},"warnings":[{"fix":"Ensure users are aware of the `ITERATIVE_DO_NOT_TRACK` environment variable to opt-out of telemetry collection.","message":"Telemetry can be entirely disabled by setting the environment variable `ITERATIVE_DO_NOT_TRACK=1`. This is a crucial user control for privacy.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Upgrade to version 0.0.10 or newer to ensure robust exception handling in daemonized applications.","message":"Prior to version 0.0.10, telemetry exception handling in daemon mode was fixed. Older versions may have experienced silent failures or unhandled exceptions in long-running background processes.","severity":"gotcha","affected_versions":"<0.0.10"},{"fix":"Upgrade to version 0.0.8 or newer to include exception handling for missing GitHub CLI.","message":"Before version 0.0.8, the library might have failed if the GitHub CLI was expected (e.g., for user ID inference) but not present on the system, leading to unexpected errors.","severity":"gotcha","affected_versions":"<0.0.8"},{"fix":"Be aware that as a beta project, API surface or behavior may change in future versions. Review changelogs carefully when upgrading.","message":"The library is currently in 'Beta' development status (4 - Beta). While stable for its current use cases, the API or internal mechanisms might still undergo changes in future minor or major releases.","severity":"gotcha","affected_versions":"All 0.0.x versions"}],"env_vars":null,"last_verified":"2026-04-10T00:00:00.000Z","next_check":"2026-07-09T00:00:00.000Z"}