Adds new elasticsearch client to telemetry plugin#78046
Merged
TinaHeiligers merged 54 commits intoelastic:masterfrom Sep 25, 2020
Merged
Adds new elasticsearch client to telemetry plugin#78046TinaHeiligers merged 54 commits intoelastic:masterfrom
TinaHeiligers merged 54 commits intoelastic:masterfrom
Conversation
…ent xpack_usage getter
…toring Collection's start method
…ion-with-new-esClient
…clients to use new in boolean
TinaHeiligers
commented
Sep 24, 2020
chrisronline
approved these changes
Sep 24, 2020
Contributor
chrisronline
left a comment
There was a problem hiding this comment.
LGTM for stack monitoring!
TinaHeiligers
commented
Sep 24, 2020
| // 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; |
Contributor
Author
There was a problem hiding this comment.
@chrisronline I've made the change you wanted 😄
Contributor
Author
|
@elasticmachine merge upstream |
1 similar comment
Contributor
Author
|
@elasticmachine merge upstream |
Contributor
Author
|
@elasticmachine merge upstream |
Contributor
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
gmmorris
added a commit
to gmmorris/kibana
that referenced
this pull request
Sep 28, 2020
* 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) ...
Contributor
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
3 tasks
Contributor
|
Pinging @elastic/kibana-core (Team:Core) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
localandlocal-xpackusage collection. The new client is exposed to usage collectors in theirfetchmethods 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