As a user,
I want to opt-in to telemetry in a seamless way across Chef CLI tools
so that I have a consistent user experience
As a user,
I want to be interactively prompted for telemetry opt-in
so that I am explicitly aware it is a possibility
As a user,
I want my opt-in decision to be persisted
so that I am not distracted by repeated prompts
As a developer,
I want to re-use common functionality
so that I do not waste effort
Specification
This discusses inspec, but any Chef CLI tool would be the same. These points assume inspec is being run for the first time.
The ENV variable CHEF_TELEMETRY will be checked. It may have values OPT_OUT, OPT_IN, OPT_IN_NO_PERSIST, OPT_OUT_NO_PERSIST. The env var CHEF_TELEMETRY_OPT_OUT (in current implementation) will also be checked and if present will be treated as equivalent to OPT_OUT_NO_PERSIST. If any of these env vars are present, no interactive prompt is given.
when you run inspec for the first time, you are asked if you would like to enable telemetry. The default answer for whether to enable telemetry is to be "Yes". General UX should feel similar to the license-acceptance flow; see https://github.com/chef/license-acceptance
Unlike license-acceptance, if the terminal is non-interactive or a timeout occurs, --telemetry opt-out-no-persist is assumed and processing continues.
Optionally (natch), chef-telemetry may provide CLI framework options, such as for Thor. --telemetry {opt-out|opt-out-no-persist|opt-in|opt-in-no-persist}
the subcommands that are immune from license gating (version, help, etc) are also not to be affected by telemetry gating
Practically speaking:
add persistence methods to Telemetry::Decision
alter environment variable logic
add a method that checks for the options, env vars, and persistent files and then performs the UI work if no decision has been made - similar to LicenseAcceptance::Acceptor.check_and_persist
optionally Thor option implementation
Downstream Impact
chef-apply
any other future Chef ruby tools that use Telemetry
Motivation
As a user, I want to opt-in to telemetry in a seamless way across Chef CLI tools so that I have a consistent user experience
As a user, I want to be interactively prompted for telemetry opt-in so that I am explicitly aware it is a possibility
As a user, I want my opt-in decision to be persisted so that I am not distracted by repeated prompts
As a developer, I want to re-use common functionality so that I do not waste effort
Specification
This discusses
inspec
, but any Chef CLI tool would be the same. These points assumeinspec
is being run for the first time.--telemetry opt-out-no-persist
is assumed and processing continues.--telemetry {opt-out|opt-out-no-persist|opt-in|opt-in-no-persist}
version
,help
, etc) are also not to be affected by telemetry gatingPractically speaking:
Downstream Impact