-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Adds new elasticsearch client to telemetry plugin #78046
Adds new elasticsearch client to telemetry plugin #78046
Conversation
…ent xpack_usage getter
…toring Collection's start method
…ion-with-new-esClient
…clients to use new in boolean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for stack monitoring!
// The new client should be inititalized with a similar config to `this.cluster` but, since we're not using | ||
// the new client in Monitoring Telemetry collection yet, setting the local client allos progress for now. | ||
// We will update the client in a follow up PR. | ||
this.telemetryElasticsearchClient = elasticsearch.client; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chrisronline I've made the change you wanted 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
@elasticmachine merge upstream |
1 similar comment
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
* master: (226 commits) [Enterprise Search] Added Logic for the Credentials View (elastic#77626) [CSM] Js errors (elastic#77919) Add the @kbn/apm-config-loader package (elastic#77855) [Security Solution] Refactor useSelector (elastic#75297) Implement tagcloud renderer (elastic#77910) [APM] Alerting: Add global option to create all alert types (elastic#78151) [Ingest pipelines] Upload indexed document to test a pipeline (elastic#77939) TypeScript cleanup in visualizations plugin (elastic#78428) Lazy load metric & mardown visualizations (elastic#78391) [Detections][EQL] EQL rule execution in detection engine (elastic#77419) Update tutorial-full-experience.asciidoc (elastic#75836) Update tutorial-define-index.asciidoc (elastic#75754) Add support for runtime field types to mappings editor. (elastic#77420) [Monitoring] Usage collection (elastic#75878) [Docs][Actions] Add docs for Jira and IBM Resilient (elastic#78316) [Security Solution][Resolver] Update @timestamp formatting (elastic#78166) [Security Solution] Fix app layout (elastic#76668) [Security Solution][Resolver] 2 new functions to DAL (elastic#78477) Adds new elasticsearch client to telemetry plugin (elastic#78046) skip flaky suite (elastic#78512) (elastic#78511) (elastic#78510) (elastic#78509) (elastic#78508) (elastic#78507) (elastic#78506) (elastic#78505) (elastic#78504) (elastic#78503) (elastic#78502) (elastic#78501) (elastic#78500) ...
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Pinging @elastic/kibana-core (Team:Core) |
Summary
Resolves #75384
Support for the legacy Elasticsearch client will be removed from 7.14.
Full migration to the new client involves several steps.
There are two options we have to provide the new ES client before support for the legacy client is removed:
Either completely replace callCluster with the new client's implementation or, as suggested in #74840,
add the new client to the collectors:
The advantage of option 2 is that plugins can migrate over time.
It also gives some room to explore the effect of the new behavior (e.g. request timeout changes[0]) and breaking changes[1]
This PR implements adding the new the client and using it internally in
local
andlocal-xpack
usage collection. The new client is exposed to usage collectors in theirfetch
methods through an additional argument inbulkFetch
:There will be follow up PRs for:
Notes
The new es Client is only available from coreStart. The change to the way we register collections needs to provide a client getter rather than the object straight away (similar to the way the saved objects client is handled in the kibana_usage_collection plugin).
[0] elasticsearch.requestTimeout config value:
In the legacy client, the timeout determined the timeout before closing the connection on each request. In the new client, the request is automatically retried 3 times, meaning the request won't actually timeout until 4 * requestTimeout has elapsed.
Checklist
Delete any items that are not applicable to this PR.
For maintainers