-
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
[Data Usage] New plugin #193466
[Data Usage] New plugin #193466
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
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.
limits.yml
/ci |
💛 Build succeeded, but was flaky
Failed CI StepsTest FailuresMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
async chunk count
ESLint disabled in files
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
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.
cards navigation changes lgtm
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.
Core changes LGTM!
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
The initial serverless only plugin for viewing data usage and retention in Management. The purpose of this PR is to provide a place for other engineers to work on it, hidden from public use. - Plugin is hidden by default and can be enabled through kibana.yml `xpack.dataUsage.enabled: true` - Currently it will show up in both stateful and serverless (if enabled using config above). When we are ready to make the plugin available we will enable it in config/serverless.yml - Renders a card in Management (serverless) when enabled: <img width="1269" alt="Screenshot 2024-09-19 at 4 14 15 PM" src="https://github.com/user-attachments/assets/705e3866-bc88-436a-8532-2af53167f7b1"> elastic#192965 elastic#192966 --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
The initial serverless only plugin for viewing data usage and retention in Management. The purpose of this PR is to provide a place for other engineers to work on it, hidden from public use. - Plugin is hidden by default and can be enabled through kibana.yml `xpack.dataUsage.enabled: true` - Currently it will show up in both stateful and serverless (if enabled using config above). When we are ready to make the plugin available we will enable it in config/serverless.yml - Renders a card in Management (serverless) when enabled: <img width="1269" alt="Screenshot 2024-09-19 at 4 14 15 PM" src="https://github.com/user-attachments/assets/705e3866-bc88-436a-8532-2af53167f7b1"> #192965 #192966 --------- ## Summary Summarize your PR. If it involves visual changes include a screenshot or gif. ### Checklist Delete any items that are not applicable to this PR. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) ### Risk Matrix Delete this section if it is not applicable to this PR. Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release. When forming the risk matrix, consider some of the following examples and how they may potentially impact the change: | Risk | Probability | Severity | Mitigation/Notes | |---------------------------|-------------|----------|-------------------------| | Multiple Spaces—unexpected behavior in non-default Kibana Space. | Low | High | Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces. | | Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. | High | Low | Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure. | | Code should gracefully handle cases when feature X or plugin Y are disabled. | Medium | High | Unit tests will verify that any feature flag or plugin combination still results in our service operational. | | [See more potential risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) | ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
…ject metrics API (#193966) ## Summary <img width="2365" alt="Screenshot 2024-10-07 at 10 28 51 AM" src="https://github.com/user-attachments/assets/5c90a95d-d09d-4b44-8af3-5ca0361a5dc9"> Adds the bulk of the code for new [Data Usage plugin](#193466). Plugin is still disabled by default and will be enabled later for serverless only. - UI components (filters, charts) - Adds an internal API route that provides visualization data to render data usage charts for serverless. ### request example ```json5 GET /internal/api/data_usage/metrics?from=1726858530000&to=1726908930000&size=0&metricTypes=ingest_rate&metricTypes=storage_retained&dataStreams=ds_name_1&dataStreams=ds_name_2 ``` ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed --------- Co-authored-by: neptunian <sandra.gonzales@elastic.co> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
…ject metrics API (elastic#193966) ## Summary <img width="2365" alt="Screenshot 2024-10-07 at 10 28 51 AM" src="https://github.com/user-attachments/assets/5c90a95d-d09d-4b44-8af3-5ca0361a5dc9"> Adds the bulk of the code for new [Data Usage plugin](elastic#193466). Plugin is still disabled by default and will be enabled later for serverless only. - UI components (filters, charts) - Adds an internal API route that provides visualization data to render data usage charts for serverless. ### request example ```json5 GET /internal/api/data_usage/metrics?from=1726858530000&to=1726908930000&size=0&metricTypes=ingest_rate&metricTypes=storage_retained&dataStreams=ds_name_1&dataStreams=ds_name_2 ``` ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed --------- Co-authored-by: neptunian <sandra.gonzales@elastic.co> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit cb9f998)
…ss project metrics API (#193966) (#195412) # Backport This will backport the following commits from `main` to `8.x`: - [[DataUsage] Add internal API/UX hooks to interact with serverless project metrics API (#193966)](#193966) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Ash","email":"1849116+ashokaditya@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-10-08T13:17:12Z","message":"[DataUsage] Add internal API/UX hooks to interact with serverless project metrics API (#193966)\n\n## Summary\r\n<img width=\"2365\" alt=\"Screenshot 2024-10-07 at 10 28 51 AM\"\r\nsrc=\"https://github.com/user-attachments/assets/5c90a95d-d09d-4b44-8af3-5ca0361a5dc9\">\r\n\r\n\r\nAdds the bulk of the code for new [Data Usage\r\nplugin](#193466). Plugin is still\r\ndisabled by default and will be enabled later for serverless only.\r\n\r\n- UI components (filters, charts)\r\n- Adds an internal API route that provides visualization data to render\r\ndata usage charts for serverless.\r\n\r\n### request example\r\n```json5\r\nGET /internal/api/data_usage/metrics?from=1726858530000&to=1726908930000&size=0&metricTypes=ingest_rate&metricTypes=storage_retained&dataStreams=ds_name_1&dataStreams=ds_name_2\r\n```\r\n\r\n### Checklist\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n\r\n---------\r\n\r\nCo-authored-by: neptunian <sandra.gonzales@elastic.co>\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"cb9f998c064f4519afd9e7bbf73c9c55ef7059b3","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor"],"title":"[DataUsage] Add internal API/UX hooks to interact with serverless project metrics API","number":193966,"url":"https://github.com/elastic/kibana/pull/193966","mergeCommit":{"message":"[DataUsage] Add internal API/UX hooks to interact with serverless project metrics API (#193966)\n\n## Summary\r\n<img width=\"2365\" alt=\"Screenshot 2024-10-07 at 10 28 51 AM\"\r\nsrc=\"https://github.com/user-attachments/assets/5c90a95d-d09d-4b44-8af3-5ca0361a5dc9\">\r\n\r\n\r\nAdds the bulk of the code for new [Data Usage\r\nplugin](#193466). Plugin is still\r\ndisabled by default and will be enabled later for serverless only.\r\n\r\n- UI components (filters, charts)\r\n- Adds an internal API route that provides visualization data to render\r\ndata usage charts for serverless.\r\n\r\n### request example\r\n```json5\r\nGET /internal/api/data_usage/metrics?from=1726858530000&to=1726908930000&size=0&metricTypes=ingest_rate&metricTypes=storage_retained&dataStreams=ds_name_1&dataStreams=ds_name_2\r\n```\r\n\r\n### Checklist\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n\r\n---------\r\n\r\nCo-authored-by: neptunian <sandra.gonzales@elastic.co>\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"cb9f998c064f4519afd9e7bbf73c9c55ef7059b3"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193966","number":193966,"mergeCommit":{"message":"[DataUsage] Add internal API/UX hooks to interact with serverless project metrics API (#193966)\n\n## Summary\r\n<img width=\"2365\" alt=\"Screenshot 2024-10-07 at 10 28 51 AM\"\r\nsrc=\"https://github.com/user-attachments/assets/5c90a95d-d09d-4b44-8af3-5ca0361a5dc9\">\r\n\r\n\r\nAdds the bulk of the code for new [Data Usage\r\nplugin](#193466). Plugin is still\r\ndisabled by default and will be enabled later for serverless only.\r\n\r\n- UI components (filters, charts)\r\n- Adds an internal API route that provides visualization data to render\r\ndata usage charts for serverless.\r\n\r\n### request example\r\n```json5\r\nGET /internal/api/data_usage/metrics?from=1726858530000&to=1726908930000&size=0&metricTypes=ingest_rate&metricTypes=storage_retained&dataStreams=ds_name_1&dataStreams=ds_name_2\r\n```\r\n\r\n### Checklist\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n\r\n---------\r\n\r\nCo-authored-by: neptunian <sandra.gonzales@elastic.co>\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"cb9f998c064f4519afd9e7bbf73c9c55ef7059b3"}}]}] BACKPORT--> Co-authored-by: Ash <1849116+ashokaditya@users.noreply.github.com>
The initial serverless only plugin for viewing data usage and retention in Management. The purpose of this PR is to provide a place for other engineers to work on it, hidden from public use.
xpack.dataUsage.enabled: true
#192965
#192966