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] Use GET / to fetch the Cluster UUID #145536

Conversation

afharo
Copy link
Member

@afharo afharo commented Nov 17, 2022

Summary

Resolves #145528.

When backporting to 7.17, we need to intercept the PR (it'll likely fail anyway) and change the const body with const { body }

For maintainers

@afharo afharo added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Feature:Telemetry release_note:skip Skip the PR/issue when compiling release notes backport:all-open Backport to all branches that could still receive a release labels Nov 17, 2022
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

ESLint disabled in files

id before after diff
osquery 1 2 +1

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
fleet 59 65 +6
osquery 108 113 +5
securitySolution 441 447 +6
total +19

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
fleet 67 73 +6
osquery 109 115 +6
securitySolution 518 524 +6
total +20

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

@afharo afharo marked this pull request as ready for review November 17, 2022 12:14
@afharo afharo requested a review from a team as a code owner November 17, 2022 12:14
@elasticmachine
Copy link
Contributor

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

Comment on lines +28 to 29
const body = await esClient.info({ filter_path: 'cluster_uuid' });
return [{ clusterUuid: body.cluster_uuid }];
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems quite better, performance-wise 😅

@afharo afharo merged commit 5a2c45e into elastic:main Nov 18, 2022
@afharo afharo deleted the telemetry/use-info-endpoint-to-get-the-cluster-uuid branch November 18, 2022 10:55
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 18, 2022
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 18, 2022
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
7.17 Backport failed because of merge conflicts
8.5
8.6

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 145536

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Nov 18, 2022
…45710)

# Backport

This will backport the following commits from `main` to `8.5`:
- [[Telemetry] Use `GET /` to fetch the Cluster UUID
(#145536)](#145536)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Alejandro Fernández
Haro","email":"alejandro.haro@elastic.co"},"sourceCommit":{"committedDate":"2022-11-18T10:55:51Z","message":"[Telemetry]
Use `GET /` to fetch the Cluster UUID
(#145536)","sha":"5a2c45ea9e282b88a0ca971a35a865401b7523cd","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","Feature:Telemetry","release_note:skip","backport:all-open","v8.7.0"],"number":145536,"url":"https://github.com/elastic/kibana/pull/145536","mergeCommit":{"message":"[Telemetry]
Use `GET /` to fetch the Cluster UUID
(#145536)","sha":"5a2c45ea9e282b88a0ca971a35a865401b7523cd"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/145536","number":145536,"mergeCommit":{"message":"[Telemetry]
Use `GET /` to fetch the Cluster UUID
(#145536)","sha":"5a2c45ea9e282b88a0ca971a35a865401b7523cd"}}]}]
BACKPORT-->

Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
@afharo
Copy link
Member Author

afharo commented Nov 18, 2022

💚 All backports created successfully

Status Branch Result
7.17

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Nov 18, 2022
…45711)

# Backport

This will backport the following commits from `main` to `8.6`:
- [[Telemetry] Use `GET /` to fetch the Cluster UUID
(#145536)](#145536)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Alejandro Fernández
Haro","email":"alejandro.haro@elastic.co"},"sourceCommit":{"committedDate":"2022-11-18T10:55:51Z","message":"[Telemetry]
Use `GET /` to fetch the Cluster UUID
(#145536)","sha":"5a2c45ea9e282b88a0ca971a35a865401b7523cd","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","Feature:Telemetry","release_note:skip","backport:all-open","v8.7.0"],"number":145536,"url":"https://github.com/elastic/kibana/pull/145536","mergeCommit":{"message":"[Telemetry]
Use `GET /` to fetch the Cluster UUID
(#145536)","sha":"5a2c45ea9e282b88a0ca971a35a865401b7523cd"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/145536","number":145536,"mergeCommit":{"message":"[Telemetry]
Use `GET /` to fetch the Cluster UUID
(#145536)","sha":"5a2c45ea9e282b88a0ca971a35a865401b7523cd"}}]}]
BACKPORT-->

Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
afharo added a commit that referenced this pull request Nov 18, 2022
…145723)

# Backport

This will backport the following commits from `main` to `7.17`:
- [[Telemetry] Use `GET /` to fetch the Cluster UUID
(#145536)](#145536)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Alejandro Fernández
Haro","email":"alejandro.haro@elastic.co"},"sourceCommit":{"committedDate":"2022-11-18T10:55:51Z","message":"[Telemetry]
Use `GET /` to fetch the Cluster UUID
(#145536)","sha":"5a2c45ea9e282b88a0ca971a35a865401b7523cd","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","Feature:Telemetry","release_note:skip","backport:all-open","v8.7.0","v8.5.2"],"number":145536,"url":"https://github.com/elastic/kibana/pull/145536","mergeCommit":{"message":"[Telemetry]
Use `GET /` to fetch the Cluster UUID
(#145536)","sha":"5a2c45ea9e282b88a0ca971a35a865401b7523cd"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/145536","number":145536,"mergeCommit":{"message":"[Telemetry]
Use `GET /` to fetch the Cluster UUID
(#145536)","sha":"5a2c45ea9e282b88a0ca971a35a865401b7523cd"}},{"branch":"8.5","label":"v8.5.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/145710","number":145710,"state":"MERGED","mergeCommit":{"sha":"9178ee9ffe33c7549c9854fc3aaca6170a211312","message":"[8.5]
[Telemetry] Use `GET /` to fetch the Cluster UUID (#145536)
(#145710)\n\n# Backport\n\nThis will backport the following commits from
`main` to `8.5`:\n- [[Telemetry] Use `GET /` to fetch the Cluster
UUID\n(#145536)](https://github.com/elastic/kibana/pull/145536)\n\n<!---
Backport version: 8.9.7 -->\n\n### Questions ?\nPlease refer to the
[Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT
[{\"author\":{\"name\":\"Alejandro
Fernández\nHaro\",\"email\":\"alejandro.haro@elastic.co\"},\"sourceCommit\":{\"committedDate\":\"2022-11-18T10:55:51Z\",\"message\":\"[Telemetry]\nUse
`GET /` to fetch the Cluster
UUID\n(#145536)\",\"sha\":\"5a2c45ea9e282b88a0ca971a35a865401b7523cd\",\"branchLabelMapping\":{\"^v8.7.0$\":\"main\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"Team:Core\",\"Feature:Telemetry\",\"release_note:skip\",\"backport:all-open\",\"v8.7.0\"],\"number\":145536,\"url\":\"https://github.com/elastic/kibana/pull/145536\",\"mergeCommit\":{\"message\":\"[Telemetry]\nUse
`GET /` to fetch the Cluster
UUID\n(#145536)\",\"sha\":\"5a2c45ea9e282b88a0ca971a35a865401b7523cd\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[],\"targetPullRequestStates\":[{\"branch\":\"main\",\"label\":\"v8.7.0\",\"labelRegex\":\"^v8.7.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/145536\",\"number\":145536,\"mergeCommit\":{\"message\":\"[Telemetry]\nUse
`GET /` to fetch the Cluster
UUID\n(#145536)\",\"sha\":\"5a2c45ea9e282b88a0ca971a35a865401b7523cd\"}}]}]\nBACKPORT-->\n\nCo-authored-by:
Alejandro Fernández Haro
<alejandro.haro@elastic.co>"}},{"url":"https://github.com/elastic/kibana/pull/145711","number":145711,"branch":"8.6","state":"OPEN"}]}]
BACKPORT-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:all-open Backport to all branches that could still receive a release 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.17.8 v8.5.2 v8.6.0 v8.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Telemetry] Get Cluster UUID with a cheaper query
5 participants