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] Migrate to the new Elasticsearch client #74840

Closed
afharo opened this issue Aug 12, 2020 · 5 comments · Fixed by #80554
Closed

[Telemetry] Migrate to the new Elasticsearch client #74840

afharo opened this issue Aug 12, 2020 · 5 comments · Fixed by #80554
Assignees
Labels
Feature:Telemetry Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@afharo
Copy link
Member

afharo commented Aug 12, 2020

Migration guide: https://github.com/elastic/kibana/blob/master/src/core/MIGRATION_EXAMPLES.md#elasticsearch-client; breaking changes: https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/breaking-changes.html

Question regarding the callCluster method provided to the collectors: Should we replace it with { callCluster (with the deprecated flag), esClient (the new one), savedObjects }?

It is a breaking change, but it will also force the other plugins to adapt their logic to the new esClient if needed.

And, by providing savedObjects, collectors will have a "properly-scoped" SO client when retrieving the usage data.

@TinaHeiligers
Copy link
Contributor

TinaHeiligers commented Aug 18, 2020

We can split this work into three four related issues to make it easier to handle:

  1. Update the client and use internally (usage collectors and telemetry plugin)
  2. Expose the new client as an additional parameter to creating a usage collector (related to enriching the APIs)
  3. Replace callCluster and esClient with { callCluster, esClient } (and later on add the savedObjectsClient). This is a breaking change and will need to update all collectors using callCluster.
  4. Handle the situation when monitoring is enabled: (monitoring provides the callCluster client factory) when we provide it in the usage collectors, we need to provide it in monitoring too. (dependency: [RFC] Kibana Telemetry & Monitoring)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-telemetry (Team:KibanaTelemetry)

@TinaHeiligers
Copy link
Contributor

We have a few issues related to enriching usage collection APIs. I've kicked off the work in #75875 and will build on that.

@TinaHeiligers
Copy link
Contributor

#79044 handles step 3

@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
Feature:Telemetry Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
5 participants