Kedro-Telemetry

0.7.0 · active · verified Tue Apr 14

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.

Warnings

Install

Imports

Quickstart

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`.

import os

# Opt-out of telemetry for the current environment
os.environ['KEDRO_DISABLE_TELEMETRY'] = '1'

# Alternatively, for a specific project, create a .telemetry file in the project root:
# with open('.telemetry', 'w') as f:
#     f.write('consent: false')

# Or when creating a new Kedro project:
# kedro new --telemetry=no

# Example of running a Kedro command, which will now respect the opt-out setting
# (Note: This is illustrative, actual Kedro commands would be run from the shell)
print(f"KEDRO_DISABLE_TELEMETRY is set to: {os.environ.get('KEDRO_DISABLE_TELEMETRY')}")
print("Kedro commands executed in this environment will have telemetry disabled.")

view raw JSON →