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

[Telemetry] Fix optIn telemetry report bug #64214

Merged
merged 1 commit into from
Apr 23, 2020

Conversation

afharo
Copy link
Member

@afharo afharo commented Apr 22, 2020

Summary

I noticed that we currently fail to report the opt_in_status change when reporting telemetry from the browser (the default behaviour). The response is { streamed: false }. The reason is that the browser is trying to send { enabled: true|false } as the payload, but we are expecting the payload in that request to be encrypted and to have a different format ({ cluster_uuid, opt_in_status }).

The changes in this PR:

  • Return the encrypted payload in the response of the request to POST /api/telemetry/v2/optIn
  • Use the encrypted payload to send it to the telemetry cluster.
  • Add tests until 100% coverage of src/plugins/telemetry/public/services/telemetry_service.ts

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@afharo afharo added bug Fixes for quality problems that affect the customer experience release_note:fix Feature:Telemetry v8.0.0 :Telemetry v7.8.0 labels Apr 22, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/pulse (Team:Pulse)

@afharo afharo self-assigned this Apr 22, 2020
@afharo afharo requested review from aravindputrevu and a team and removed request for aravindputrevu April 22, 2020 16:44
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@afharo afharo marked this pull request as ready for review April 22, 2020 18:25
Copy link
Member

@Bamieh Bamieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@afharo afharo merged commit dba2ffd into elastic:master Apr 23, 2020
@afharo afharo deleted the telemetry/fix-opt-in-browser-request branch April 23, 2020 10:27
afharo added a commit to afharo/kibana that referenced this pull request Apr 23, 2020
@Bamieh Bamieh added v7.7.1 release_note:skip Skip the PR/issue when compiling release notes and removed release_note:fix labels Apr 23, 2020
afharo added a commit to afharo/kibana that referenced this pull request Apr 23, 2020
afharo added a commit that referenced this pull request Apr 23, 2020
@lukeelmers lukeelmers added the Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc label Oct 1, 2021
@elasticmachine
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Telemetry release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.7.1 v7.8.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants