{"id":5983,"library":"kedro-telemetry","title":"Kedro-Telemetry","description":"Kedro-Telemetry is a plugin for the Kedro framework that gathers anonymised and aggregated usage analytics. Its primary purpose is to help the Kedro team understand how Kedro is used, allowing them to prioritise product improvements. It currently ships as version 0.7.0 and integrates via `pluggy` hooks to send data to Heap Analytics.","status":"active","version":"0.7.0","language":"en","source_language":"en","source_url":"https://github.com/kedro-org/kedro-plugins/tree/main/kedro-telemetry","tags":["kedro","telemetry","analytics","plugin","data-pipelines"],"install":[{"cmd":"pip install kedro-telemetry","lang":"bash"}],"dependencies":[{"reason":"kedro-telemetry is a plugin for the Kedro framework and is typically installed as part of Kedro's dependencies.","package":"kedro","optional":false},{"reason":"Used for TOML parsing, specifically before Python 3.11 for reading `.telemetry` files. Post Python 3.11, `tomli` is often replaced by the standard library's `tomllib`.","package":"tomli","optional":false},{"reason":"Used for writing TOML files, specifically for `.telemetry` files.","package":"tomli-w","optional":false}],"imports":[{"note":"Functionality is managed via configuration and environment variables.","symbol":"No direct user imports","correct":"kedro-telemetry operates as a plugin for the Kedro CLI and runtime; users do not typically import symbols from it directly in their project code."}],"quickstart":{"code":"import os\n\n# Opt-out of telemetry for the current environment\nos.environ['KEDRO_DISABLE_TELEMETRY'] = '1'\n\n# Alternatively, for a specific project, create a .telemetry file in the project root:\n# with open('.telemetry', 'w') as f:\n#     f.write('consent: false')\n\n# Or when creating a new Kedro project:\n# kedro new --telemetry=no\n\n# Example of running a Kedro command, which will now respect the opt-out setting\n# (Note: This is illustrative, actual Kedro commands would be run from the shell)\nprint(f\"KEDRO_DISABLE_TELEMETRY is set to: {os.environ.get('KEDRO_DISABLE_TELEMETRY')}\")\nprint(\"Kedro commands executed in this environment will have telemetry disabled.\")","lang":"python","description":"Kedro-Telemetry is enabled by default as of version 0.6.0. The primary interaction for users is to manage consent or opt-out. The recommended way to disable telemetry is by setting the `KEDRO_DISABLE_TELEMETRY` or `DO_NOT_TRACK` environment variables to any value. Alternatively, a `.telemetry` file can be created in the project root with `consent: false`, or telemetry can be disabled during project creation using `kedro new --telemetry=no`."},"warnings":[{"fix":"Upgrade to a supported Python version (3.10 or higher).","message":"Support for Python 3.9 was dropped in version 0.7.0, making Python 3.10 the minimum supported version. Earlier versions (0.6.2) dropped Python 3.8. Kedro-Telemetry aims to support only actively maintained Python versions.","severity":"breaking","affected_versions":">=0.7.0 (for Python 3.9), >=0.6.2 (for Python 3.8)"},{"fix":"Upgrade to `kedro-telemetry >= 0.2.4` to avoid this bug.","message":"Versions `kedro-telemetry >= 0.2.2` and `< 0.2.4` had a bug that led to the collection of project size metrics (datasets, pipelines, nodes) without explicit user consent. This issue was addressed in later versions, and affected data was deleted.","severity":"gotcha","affected_versions":"0.2.2 to 0.2.3"},{"fix":"Explicitly disable telemetry using environment variables (`KEDRO_DISABLE_TELEMETRY=1` or `DO_NOT_TRACK=1`) or by creating a `.telemetry` file with `consent: false` in the project root.","message":"In automated environments (e.g., CI/CD), if telemetry consent is not explicitly granted or denied, `kedro-telemetry` might spawn an interactive prompt, causing the pipeline to crash. This is especially critical since version 0.6.0, where telemetry became opt-out by default.","severity":"gotcha","affected_versions":">=0.6.0"},{"fix":"Use environment variables (`KEDRO_DISABLE_TELEMETRY=1`) or the `.telemetry` file (`consent: false`) to disable telemetry without removing the package.","message":"Uninstalling `kedro-telemetry` using `pip uninstall kedro-telemetry` is strongly discouraged as a method to disable telemetry. It can break dependencies of the core Kedro framework and lead to `pip check` reporting issues.","severity":"deprecated","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-14T00:00:00.000Z","next_check":"2026-07-13T00:00:00.000Z","problems":[]}