Skip to content
This repository has been archived by the owner on Oct 22, 2023. It is now read-only.

Allow to disable telemetry from batect.yml #1028

Closed
sschuberth opened this issue Sep 16, 2021 · 15 comments
Closed

Allow to disable telemetry from batect.yml #1028

sschuberth opened this issue Sep 16, 2021 · 15 comments

Comments

@sschuberth
Copy link
Contributor

sschuberth commented Sep 16, 2021

Describe the problem you'd like to solve

As Batect can nicely be bootstrapped, it works out of the box even for people new to Batect. However, new users still need to explicitly opt-in/-out from collecting telemetry, which may seem inconvenient.

Describe the solution you'd like

I'd like to pre-configure the collection of telemetry on a per-project basis via a setting in batect.yml. This has two benefits:

  1. when Batect is bootstrapped / run for the first time, no annoying hint about telemetry appears, and
  2. collection of telemetry can be configured on a per-project basis, so you can allow telemetry collection for some projects, and disallow it for other projects for the same user.

Describe alternatives you've considered

No response

Additional context

No response

@charleskorn
Copy link
Collaborator

Thanks for the suggestion @sschuberth.

I can see value in having something that disables telemetry for a project even if a user has enabled it, however, I'm not keen to add something that enables telemetry automatically with no user intervention - that seems like something that a user should still have control over. Does that make sense?

@sschuberth
Copy link
Contributor Author

Yes, makes sense. So essentially, the idea would be to only allow to disable telemetry from batect.yml, but not to enable it.

@sschuberth
Copy link
Contributor Author

So, how would you go for implementing this, @charleskorn? In particular, where exactly inside batect.yml should this be configured? Should we allow the user to add a special entry to config_variables to disable telemetry?

@charleskorn
Copy link
Collaborator

I was thinking it could be a top-level configuration option in batect.yml, similar to project_name. Something like forbid_telemetry perhaps?

I'm keen to keep config variables for users to do with as they wish.

What do you think?

@sschuberth
Copy link
Contributor Author

Top-level sounds fine. Not sure about the naming yet, though. Maybe slightly less "strict" disable_telemetry?

@charleskorn
Copy link
Collaborator

I'm not sure on the name either... I was trying to find a name where it was clear that setting the value to false doesn't mean that telemetry is enabled. Another option would be to avoid using a boolean and instead do something like telemetry: if_consented / telemetry: forbidden.

@sschuberth
Copy link
Contributor Author

Maybe telemetry_opt_out: true or forbid_telemetry: true?

@sschuberth
Copy link
Contributor Author

Ping @charleskorn! Do you think this is something that could be solved for the next release of Batect? Together with #1016 these were the blockers for us to take Batect into production use.

@charleskorn
Copy link
Collaborator

Yep, definitely. Sorry for the delay - I've been working on something else but that's not urgent.

@sschuberth
Copy link
Contributor Author

I've been working on something else but that's not urgent.

Huh, interesting stuff (and technical approach)!

charleskorn added a commit to batect/batect.dev that referenced this issue Oct 26, 2021
@charleskorn
Copy link
Collaborator

I've just added this and it will be released as part of 0.75.0 shortly. Please give it a go and let me know if you have any feedback!

@sschuberth
Copy link
Contributor Author

Hmm, something seem to not be working here. If I check out this branch of our project and initially run ./batect requirements on a machine where Batect hasn't run before, I still get the prompt

Batect can collect anonymous environment, usage and performance information.
This information does not include personal or sensitive information, and is used only to help improve Batect.
More information is available at https://batect.dev/privacy, including details of what information is collected and a formal privacy policy.

Is it OK for Batect to collect this information? (Y/n)

despite having forbid_telemetry: true in batect.yml. But due to this setting I'm expecting to not see the prompt at all.

@charleskorn
Copy link
Collaborator

charleskorn commented Oct 27, 2021

But due to this setting I'm expecting to not see the prompt at all.

Ah, interesting - that would be a slightly bigger change, as the telemetry consent prompt happens before the configuration file is loaded. That's definitely something that can be fixed though.

Even if you answer 'yes' to the prompt here, telemetry information will still not be collected for any project with forbid_telemetry: true - your consent would only apply to projects that don't forbid telemetry.

@charleskorn charleskorn reopened this Oct 27, 2021
charleskorn added a commit that referenced this issue Nov 2, 2021
…if forbid_telemetry is set to true in the project configuration file.

See #1028 (comment).
@charleskorn
Copy link
Collaborator

Thanks for catching this @sschuberth - I've fixed this issue and it will be included in the next release.

@sschuberth
Copy link
Contributor Author

Awesome @charleskorn, thanks for the follow-up fix and new release!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants