Skip to content

[Telemetry] Fetch snapshot: allow specifying the version via querystring#164670

Merged
afharo merged 1 commit intoelastic:mainfrom
afharo:telemetry/snapshot/allow-version-via-querystring
Aug 24, 2023
Merged

[Telemetry] Fetch snapshot: allow specifying the version via querystring#164670
afharo merged 1 commit intoelastic:mainfrom
afharo:telemetry/snapshot/allow-version-via-querystring

Conversation

@afharo
Copy link
Copy Markdown
Member

@afharo afharo commented Aug 24, 2023

Summary

We tend to use the Telemetry Snapshot endpoint during development to test our collectors and to understand the behavior of Kibana.

The easiest way to interact with it is the Dev Console. However, it does not allow specifying any headers. Let's allow specifying the version through the query parameter for this endpoint:

POST kbn:/internal/telemetry/clusters/_stats?apiVersion=2
{ "unencrypted": true }

For maintainers

@afharo afharo added Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// technical debt Improvement of the software architecture and operational architecture release_note:skip Skip the PR/issue when compiling release notes backport:prev-minor labels Aug 24, 2023
@afharo afharo self-assigned this Aug 24, 2023
@afharo afharo marked this pull request as ready for review August 24, 2023 08:39
@afharo afharo requested a review from a team as a code owner August 24, 2023 08:39
@elasticmachine
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

@pgayvallet pgayvallet left a comment

Choose a reason for hiding this comment

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

LGTM

If we're planning on needing this on multiple APIs, I wonder if the better solution wouldn't be for the dev console to allow passing the version header somehow for kbn: requests.

@afharo afharo enabled auto-merge (squash) August 24, 2023 09:10
@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 15.7MB 15.7MB +6.4KB
securitySolutionServerless 249.3KB 255.5KB +6.2KB
total +12.7KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
securitySolutionServerless 38.0KB 38.0KB +2.0B

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

cc @afharo

@afharo afharo merged commit 57a5824 into elastic:main Aug 24, 2023
@afharo afharo deleted the telemetry/snapshot/allow-version-via-querystring branch August 24, 2023 10:13
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 24, 2023
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
8.10

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 Aug 24, 2023
…uerystring (#164670) (#164684)

# Backport

This will backport the following commits from `main` to `8.10`:
- [[Telemetry] Fetch snapshot: allow specifying the version via
querystring (#164670)](#164670)

<!--- 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":"2023-08-24T10:13:38Z","message":"[Telemetry]
Fetch snapshot: allow specifying the version via querystring
(#164670)","sha":"57a58240d3c784d5bd9fac835f59cce39b923a6d","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","technical
debt","release_note:skip","backport:prev-minor","v8.11.0"],"number":164670,"url":"https://github.com/elastic/kibana/pull/164670","mergeCommit":{"message":"[Telemetry]
Fetch snapshot: allow specifying the version via querystring
(#164670)","sha":"57a58240d3c784d5bd9fac835f59cce39b923a6d"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/164670","number":164670,"mergeCommit":{"message":"[Telemetry]
Fetch snapshot: allow specifying the version via querystring
(#164670)","sha":"57a58240d3c784d5bd9fac835f59cce39b923a6d"}}]}]
BACKPORT-->

Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
jloleysens added a commit that referenced this pull request Aug 24, 2023
* main: (3152 commits)
  [Security Solution][Detection Engine] fixes 410 error on index legacy template call (#164682)
  [SavedObjects] Create serverless roots for jest integration tests (#164157)
  Create upselling package and implement EntityAnalytics serverless upselling (#164136)
  [Fleet] Change 'Out-of-date' to 'Outdated policy' in agent list table (#164673)
  [IndexManagement] Use internal base path for API (#164665)
  [Profiling] removing ~ symbol (#164595)
  [Telemetry] Fetch snapshot: allow specifying the version via querystring (#164670)
  [Cases] Show warning when all cases table reaches 10k cases message (#164323)
  [ML] Removing token list from text expansion model testing (#164560)
  [Fleet] Add secrets package API integration test (#164583)
  [Fleet] Fix security solution tag id (#164582)
  [Security Solution] Modal says "duplicating 0 rules" when you duplicate an individual rule (#163908)
  [api-docs] 2023-08-24 Daily api_docs build (#164658)
  [APM] Cleanup alerting api tests (#164438)
  Upgrade EUI to 87.2.0 (#164385)
  [ML] Fix query bar autocompletion for ML and AIOps embeddables (#164485)
  [Fleet] Fix flaky unit test for the details page (#164641)
  [Security Solution] update codeowner for serverless security subdir (#164640)
  [Security Solution] Fixes Assistant Connector and Actions RBAC Flow (#164382)
  [Discover] Removing large string truncation from doc viewer (#164236)
  ...
@mgiota
Copy link
Copy Markdown
Contributor

mgiota commented Dec 12, 2023

If we're planning on needing this on multiple APIs, I wonder if the better solution wouldn't be for the dev console to allow passing the version header somehow for kbn: requests.

@pgayvallet I agree. Looks like more teams need to specify the version via querystring. Do you know which team is responsible for solving this issue globally? I am using the transform api on Dev tools and since it is versioned I had to locally change the transform register route code to be able to use kbn: on Dev tools. I see there is a similar open PR from Fleet team (cc @criamico).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_note:skip Skip the PR/issue when compiling release notes Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// technical debt Improvement of the software architecture and operational architecture v8.10.0 v8.11.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants