Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kedro-telemetry: Introduce environment variables for disabling telemetry and revise disabling methods #728

Closed
DimedS opened this issue Jun 14, 2024 · 4 comments · Fixed by #762
Assignees

Comments

@DimedS
Copy link
Contributor

DimedS commented Jun 14, 2024

Description

Part of #715:

Introduce two new environment variables for disabling telemetry:

  • DO_NOT_TRACK
  • KEDRO_DISABLE_TELEMETRY
    When either of these variables is set to True or 1, telemetry should not be used. This will have the same effect as setting consent: false in the .telemetry file, but without the need to modify the file. We will only check the consent.

Context

Detailed explanation provided by @astrojuanlu in this comment.

When all the opt-out tasks for #715 are completed these should be the ways to disable telemetry:

  1. Environment Variables:
    Set the environment variables DO_NOT_TRACK or KEDRO_DISABLE_TELEMETRY to 1. Setting either of these variables will fully disable telemetry for all projects in that environment.
  2. Telemetry File:
    Create a .telemetry file in the root folder of the Kedro project and write there consent: false. This disables telemetry for any kedro command executed within that project's folder.
  3. CLI Option when creating a new project:
    When creating a new project, users can use the command kedro new --telemetry=yes/no. This will create a .telemetry file with consent: true/false accordingly. However, telemetry data about the execution of the kedro new command will still be sent after kedro-telemetry: Spike how to enable telemetry for "kedro new" and other commands executed outside of kedro project folder #729 implementation.
  4. pip uninstall kedro-telemetry
  5. CLI telemetry Disable for each command execution:
    Previously, we attempted to implement a CLI consent disable for kedro run command (see Issue 2867), but it was reverted due to unclear initial design. Considering the shift to an opt-out model, I believe @ankatiyar's proposal to provide consent for each execution of certain Kedro commands is still relevant.

Let's discuss this proposal:

  • Implement a --no-telemetry flag for kedro run and possibly other commands: kedro run --no-telemetry.
  • This flag will disable telemetry only for that execution of that particular command.
  • This can be beneficial for users who want to run their projects in CI/CD processes without needing to set environment variables.
@DimedS DimedS changed the title kedro-telemetry: Introduce environment variables for disabling telemetry kedro-telemetry: Introduce environment variables for disabling telemetry and revise disabling methods Jun 15, 2024
@astrojuanlu
Copy link
Member

  1. pip uninstall kedro-telemetry

Does this conflict with #726? We should not counsel users to remove mandatory dependencies to avoid having pip showcase warnings of broken environments.

  1. CLI telemetry Disable for each command execution

Wondering if this granularity is excessive. I wouldn't see users wanting to disable telemetry for some commands, but not others.

@merelcht merelcht changed the title kedro-telemetry: Introduce environment variables for disabling telemetry and revise disabling methods kedro-telemetry: Introduce environment variables for disabling telemetry and revise disabling methods Jul 1, 2024
@merelcht merelcht added this to the Telemetry opt-out milestone Jul 1, 2024
@merelcht
Copy link
Member

merelcht commented Jul 1, 2024

  1. pip uninstall kedro-telemetry

Does this conflict with #726? We should not counsel users to remove mandatory dependencies to avoid having pip showcase warnings of broken environments.

Maybe we could mention this as a "last resort" solution. But also say we don't advice doing this because pip will then complain.

@noklam
Copy link
Contributor

noklam commented Jul 9, 2024

Few questions for @DimedS :

  • At which point telemetry tracking is started? It's ok if user have access to a terminal and export the environment variable before launch kedro. What about people who want to set environment variable programatically, is there a preferred way to do so?
  • Are all 5 ways to disable telemetry still valid/relevant under the context that telemetry is mandatory? As @astrojuanlu suggested, with the switch from opt-in -> opt-out, the --no-telemetry argument could be redundant as there will be no prompting with new project.

@astrojuanlu
Copy link
Member

About --no-telemetry, we couldn't think of cases in which users would opt out for some commands, but not others. It's annoying to type every time too. I think it's not worth adding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants