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

[8.15] [Infra] Limit the number of metrics accepted by Metrics Explorer API (#188112) #188442

Merged
merged 2 commits into from
Jul 17, 2024

Conversation

crespocarlos
Copy link
Contributor

Backport

This will backport the following commits from main to 8.15:

Questions ?

Please refer to the Backport tool documentation

…lastic#188112)

part of [3628](elastic/observability-dev#3628)
- private

## Summary

After adding 20 items, users can no longer add more fields and will see
the message below

<img width="1725" alt="image"
src="https://github.com/elastic/kibana/assets/2767137/fd504212-0e0f-485d-a8fe-b991c829950e">

### Extra

- There was an unused and duplicate `metrics_explorer` route in infra. I
removed it. It should've been removed when the `metrics_data_access`
plugin was created.
- Cleaned up `constants` field in `metrics_data_access` and `infra`
plugins

### How to test

- Start a local Kibana instance pointing to an oblt cluster
- Navigate to Infrastructure > Metrics Explorer
- Try to select more than 20 fields in the metrics field

---------

Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 5ec5b99)

# Conflicts:
#	x-pack/plugins/observability_solution/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_data.ts
#	x-pack/plugins/observability_solution/infra/server/routes/metrics_explorer/index.ts
#	x-pack/plugins/observability_solution/metrics_data_access/server/routes/metrics_explorer/index.ts
@obltmachine
Copy link

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Contributor

elasticmachine commented Jul 16, 2024

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
metricsDataAccess 104 105 +1

Async chunks

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

id before after diff
infra 1.5MB 1.5MB +889.0B

Page load bundle

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

id before after diff
infra 102.1KB 102.0KB -48.0B
metricsDataAccess 57.0KB 57.1KB +72.0B
total +24.0B
Unknown metric groups

API count

id before after diff
metricsDataAccess 104 105 +1

History

@crespocarlos crespocarlos merged commit f93a209 into elastic:8.15 Jul 17, 2024
23 checks passed
crespocarlos referenced this pull request Jul 17, 2024
…er API (#188112) (#188447)

# Backport

This will backport the following commits from `main` to `7.17`:
- [[Infra] Limit the number of metrics accepted by Metrics Explorer API
(#188112)](#188112)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Carlos
Crespo","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-07-16T13:44:05Z","message":"[Infra]
Limit the number of metrics accepted by Metrics Explorer API
(#188112)\n\npart of
[3628](https://github.com/elastic/observability-dev/issues/3628)\r\n-
private\r\n\r\n## Summary\r\n\r\nAfter adding 20 items, users can no
longer add more fields and will see\r\nthe message below\r\n\r\n\r\n<img
width=\"1725\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/2767137/fd504212-0e0f-485d-a8fe-b991c829950e\">\r\n\r\n\r\n###
Extra\r\n\r\n- There was an unused and duplicate `metrics_explorer`
route in infra. I\r\nremoved it. It should've been removed when the
`metrics_data_access`\r\nplugin was created.\r\n- Cleaned up `constants`
field in `metrics_data_access` and `infra`\r\nplugins\r\n\r\n### How to
test\r\n\r\n- Start a local Kibana instance pointing to an oblt
cluster\r\n- Navigate to Infrastructure > Metrics Explorer\r\n- Try to
select more than 20 fields in the metrics
field\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<[email protected]>\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"5ec5b994dcc4c47912ad29e6b8da92c4f855041f","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","ci:project-deploy-observability","Team:obs-ux-infra_services","v8.16.0"],"number":188112,"url":"https://github.com/elastic/kibana/pull/188112","mergeCommit":{"message":"[Infra]
Limit the number of metrics accepted by Metrics Explorer API
(#188112)\n\npart of
[3628](https://github.com/elastic/observability-dev/issues/3628)\r\n-
private\r\n\r\n## Summary\r\n\r\nAfter adding 20 items, users can no
longer add more fields and will see\r\nthe message below\r\n\r\n\r\n<img
width=\"1725\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/2767137/fd504212-0e0f-485d-a8fe-b991c829950e\">\r\n\r\n\r\n###
Extra\r\n\r\n- There was an unused and duplicate `metrics_explorer`
route in infra. I\r\nremoved it. It should've been removed when the
`metrics_data_access`\r\nplugin was created.\r\n- Cleaned up `constants`
field in `metrics_data_access` and `infra`\r\nplugins\r\n\r\n### How to
test\r\n\r\n- Start a local Kibana instance pointing to an oblt
cluster\r\n- Navigate to Infrastructure > Metrics Explorer\r\n- Try to
select more than 20 fields in the metrics
field\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<[email protected]>\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"5ec5b994dcc4c47912ad29e6b8da92c4f855041f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/188112","number":188112,"mergeCommit":{"message":"[Infra]
Limit the number of metrics accepted by Metrics Explorer API
(#188112)\n\npart of
[3628](https://github.com/elastic/observability-dev/issues/3628)\r\n-
private\r\n\r\n## Summary\r\n\r\nAfter adding 20 items, users can no
longer add more fields and will see\r\nthe message below\r\n\r\n\r\n<img
width=\"1725\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/2767137/fd504212-0e0f-485d-a8fe-b991c829950e\">\r\n\r\n\r\n###
Extra\r\n\r\n- There was an unused and duplicate `metrics_explorer`
route in infra. I\r\nremoved it. It should've been removed when the
`metrics_data_access`\r\nplugin was created.\r\n- Cleaned up `constants`
field in `metrics_data_access` and `infra`\r\nplugins\r\n\r\n### How to
test\r\n\r\n- Start a local Kibana instance pointing to an oblt
cluster\r\n- Navigate to Infrastructure > Metrics Explorer\r\n- Try to
select more than 20 fields in the metrics
field\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<[email protected]>\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"5ec5b994dcc4c47912ad29e6b8da92c4f855041f"}},{"url":"https://github.com/elastic/kibana/pull/188442","number":188442,"branch":"8.15","state":"OPEN"}]}]
BACKPORT-->

---------

Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
adelisle referenced this pull request in Makila-AI/kibana Aug 5, 2024
…er API (elastic#188112) (elastic#188447)

# Backport

This will backport the following commits from `main` to `7.17`:
- [[Infra] Limit the number of metrics accepted by Metrics Explorer API
(elastic#188112)](elastic#188112)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Carlos
Crespo","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-07-16T13:44:05Z","message":"[Infra]
Limit the number of metrics accepted by Metrics Explorer API
(elastic#188112)\n\npart of
[3628](https://github.com/elastic/observability-dev/issues/3628)\r\n-
private\r\n\r\n## Summary\r\n\r\nAfter adding 20 items, users can no
longer add more fields and will see\r\nthe message below\r\n\r\n\r\n<img
width=\"1725\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/2767137/fd504212-0e0f-485d-a8fe-b991c829950e\">\r\n\r\n\r\n###
Extra\r\n\r\n- There was an unused and duplicate `metrics_explorer`
route in infra. I\r\nremoved it. It should've been removed when the
`metrics_data_access`\r\nplugin was created.\r\n- Cleaned up `constants`
field in `metrics_data_access` and `infra`\r\nplugins\r\n\r\n### How to
test\r\n\r\n- Start a local Kibana instance pointing to an oblt
cluster\r\n- Navigate to Infrastructure > Metrics Explorer\r\n- Try to
select more than 20 fields in the metrics
field\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<[email protected]>\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"5ec5b994dcc4c47912ad29e6b8da92c4f855041f","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","ci:project-deploy-observability","Team:obs-ux-infra_services","v8.16.0"],"number":188112,"url":"https://github.com/elastic/kibana/pull/188112","mergeCommit":{"message":"[Infra]
Limit the number of metrics accepted by Metrics Explorer API
(elastic#188112)\n\npart of
[3628](https://github.com/elastic/observability-dev/issues/3628)\r\n-
private\r\n\r\n## Summary\r\n\r\nAfter adding 20 items, users can no
longer add more fields and will see\r\nthe message below\r\n\r\n\r\n<img
width=\"1725\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/2767137/fd504212-0e0f-485d-a8fe-b991c829950e\">\r\n\r\n\r\n###
Extra\r\n\r\n- There was an unused and duplicate `metrics_explorer`
route in infra. I\r\nremoved it. It should've been removed when the
`metrics_data_access`\r\nplugin was created.\r\n- Cleaned up `constants`
field in `metrics_data_access` and `infra`\r\nplugins\r\n\r\n### How to
test\r\n\r\n- Start a local Kibana instance pointing to an oblt
cluster\r\n- Navigate to Infrastructure > Metrics Explorer\r\n- Try to
select more than 20 fields in the metrics
field\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<[email protected]>\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"5ec5b994dcc4c47912ad29e6b8da92c4f855041f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/188112","number":188112,"mergeCommit":{"message":"[Infra]
Limit the number of metrics accepted by Metrics Explorer API
(elastic#188112)\n\npart of
[3628](https://github.com/elastic/observability-dev/issues/3628)\r\n-
private\r\n\r\n## Summary\r\n\r\nAfter adding 20 items, users can no
longer add more fields and will see\r\nthe message below\r\n\r\n\r\n<img
width=\"1725\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/2767137/fd504212-0e0f-485d-a8fe-b991c829950e\">\r\n\r\n\r\n###
Extra\r\n\r\n- There was an unused and duplicate `metrics_explorer`
route in infra. I\r\nremoved it. It should've been removed when the
`metrics_data_access`\r\nplugin was created.\r\n- Cleaned up `constants`
field in `metrics_data_access` and `infra`\r\nplugins\r\n\r\n### How to
test\r\n\r\n- Start a local Kibana instance pointing to an oblt
cluster\r\n- Navigate to Infrastructure > Metrics Explorer\r\n- Try to
select more than 20 fields in the metrics
field\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<[email protected]>\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"5ec5b994dcc4c47912ad29e6b8da92c4f855041f"}},{"url":"https://github.com/elastic/kibana/pull/188442","number":188442,"branch":"8.15","state":"OPEN"}]}]
BACKPORT-->

---------

Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport ci:project-deploy-observability Create an Observability project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants