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

Deprecate telemetry.enabled: false #129015

Closed
3 tasks
Tracked by #121992
afharo opened this issue Mar 31, 2022 · 3 comments · Fixed by #133205
Closed
3 tasks
Tracked by #121992

Deprecate telemetry.enabled: false #129015

afharo opened this issue Mar 31, 2022 · 3 comments · Fixed by #133205
Labels
discuss Feature:Telemetry impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:medium Medium Level of Effort Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@afharo
Copy link
Member

afharo commented Mar 31, 2022

We currently have 2 ways of disabling telemetry:

  1. telemetry.optIn: false and its similar Advanced Setting: we stop sending any data to our telemetry cluster
  2. telemetry.enabled: false: the plugin is completely disabled in Kibana. Meaning its code is not loaded.

Following #89584, we want to reduce the ability to disable plugins to make testing easier. Additionally, the new #121992 client would benefit from the telemetry plugin not being disabled to flush its internal queues as soon as it's notified about opted-out.

What's the best way to transition into deprecating this value?

I tested that adding the following deprecation step in the telemetry config definition file works as expected:

export const config: PluginConfigDescriptor<TelemetryConfigType> = {
  schema: configSchema,
  exposeToBrowser: {
    enabled: true,
    banner: true,
    allowChangingOptInStatus: true,
    optIn: true,
    sendUsageFrom: true,
    sendUsageTo: true,
  },
  deprecations: ({ rename }) => [
    rename('enabled', 'optIn', {
      level: 'warning',
      message:
        'The Telemetry plugin cannot be disabled. To opt-out from usage reporting, set `telemetry.optIn` to `false`',
      correctiveActions: {
        manualSteps: [
          'Set `telemetry.optIn` to `false` in `kibana.yml`',
          'Remove `telemetry.enabled` in `kibana.yml`',
        ],
      },
    }),
  ],
};

However, there are some additional changes we may want to take into consideration:

  • Should we allow allowChangingOptInStatus: false when optIn: false so Admins can fully disable any banners?
  • We need to make sure that banners are not shown when they shouldn't. i.e.: If optIn: false and it cannot be changed via the UI allowChangingOptInStatus: false, it shouldn't show the Privacy Statement on top of not showing the opt-in/out UI options (Self-managed telemetry Privacy Statement notice shown in Cloud environment #110638).
  • anything else??
@afharo afharo added discuss Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Feature:Telemetry labels Mar 31, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@afharo afharo added loe:medium Medium Level of Effort impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. labels Mar 31, 2022
@Bamieh
Copy link
Member

Bamieh commented Mar 31, 2022

+1 for deprecating the enabled flag.

We prompt users to re-optin upon kibana upgrades. with enabled: false is set this behavior was completely disabled but now there will be no way to disable it directly, instead users need to set allowChangingOptInStatus: false in addition to optin: false.

@afharo
Copy link
Member Author

afharo commented May 18, 2022

We identified another potential win: https://discuss.elastic.co/t/kibana-wont-start-after-8-2-0-upgrade/304881

The user disabled telemetry via telemetry.enabled: false but the Telemetry SavedObject was previously created. The SO migrations failed because of the unknown telemetry SO type existed in the index, but was not registered by any plugin (again, the Telemetry plugin is now disabled).

Deprecating telemetry.enabled: false will solve this issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Feature:Telemetry impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:medium Medium Level of Effort Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants