-
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
[One Discover] Add app menu actions for Observability projects #198987
[One Discover] Add app menu actions for Observability projects #198987
Conversation
Pinging @elastic/obs-ux-logs-team (Team:obs-ux-logs) |
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.
Kibana.jsonc LGTM
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
🤖 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.
Code-only review so far, I'll test locally tomorrow and review again. Code changes look great! Just one request: any chance we could add some simple functional tests for the app menu in the O11y profile?
...areness/profile_providers/observability/observability_root_profile/accessors/get_app_menu.ts
Outdated
Show resolved
Hide resolved
...areness/profile_providers/observability/observability_root_profile/accessors/get_app_menu.ts
Outdated
Show resolved
Hide resolved
...areness/profile_providers/observability/observability_root_profile/accessors/get_app_menu.ts
Outdated
Show resolved
Hide resolved
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.
Code changes look good and it's working well overall! Just noticed a few things while testing to look into.
...areness/profile_providers/observability/observability_root_profile/accessors/get_app_menu.ts
Show resolved
Hide resolved
...areness/profile_providers/observability/observability_root_profile/accessors/get_app_menu.ts
Show resolved
Hide resolved
}); | ||
}; | ||
|
||
const registerCreateSLOAction = ( |
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.
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.
I reproduced it but it looks like a bug on the SLOs end, we are just embedding the creation flyout.
Could you open an issue for the SLOs team please?
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.
I was unable to reproduce this outside of Discover directly in the SLOs app. It seems they might be stripping the $state
property from filters or something similar before saving:
Do you know of another area in Kibana where I can create SLOs to try to reproduce it? Mainly I'm unsure if this is a bug that affects other usages too, or if the expectation is that consumers somehow modify the filters as they do before saving.
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.
Hey Davis, I tried this on Logs Explorer too and it is affected in the same way.
As you thought, the expectation is that the filters don't have the $state
property, which is reason why it fails validating the payload sent to the server and fails the SLO creation.
I stripped the property client side and it works fine now
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.
Nice, I confirmed it works now!
...areness/profile_providers/observability/observability_root_profile/accessors/get_app_menu.ts
Show resolved
Hide resolved
...areness/profile_providers/observability/observability_root_profile/accessors/get_app_menu.ts
Show resolved
Hide resolved
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.
Obs-ux-logs code changes review only, 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.
Another round of review! Looks good to me, the only thing I'd like to understand before approving is if the SLO filters bug is really something encountered elsewhere or if we are supposed to be doing something to handle it in Discover. My other feedback is not blocking.
...areness/profile_providers/observability/observability_root_profile/accessors/get_app_menu.ts
Show resolved
Hide resolved
...areness/profile_providers/observability/observability_root_profile/accessors/get_app_menu.ts
Show resolved
Hide resolved
}); | ||
}; | ||
|
||
const registerCreateSLOAction = ( |
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.
I was unable to reproduce this outside of Discover directly in the SLOs app. It seems they might be stripping the $state
property from filters or something similar before saving:
Do you know of another area in Kibana where I can create SLOs to try to reproduce it? Mainly I'm unsure if this is a bug that affects other usages too, or if the expectation is that consumers somehow modify the filters as they do before saving.
...areness/profile_providers/observability/observability_root_profile/accessors/get_app_menu.ts
Show resolved
Hide resolved
...areness/profile_providers/observability/observability_root_profile/accessors/get_app_menu.ts
Show resolved
Hide resolved
…ni/kibana into 182230-app-menu-logs-experience
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.
Great work! The SLO issue is resolved and this now LGTM 👍
}); | ||
}; | ||
|
||
const registerCreateSLOAction = ( |
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.
Nice, I confirmed it works now!
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
History
|
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11834880403 |
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…ic#198987) ## 📓 Summary Closes elastic#182230 This work introduces a new observability root profile and uses the new extension point to register custom actions on the app menu. The registered actions and link will appear only with the new project navigation enabled on an Observability project: - A link to the data sets quality page - On the alerts sub menu... - replace the default search rule creation with the observability custom threshold rule - add an entry to directly create an SLO for the current search To access the SLO capabilities without breaking the dependencies hierarchy of the new sustainable architecture, the feature is registered by the common plugin `discover-shared` in SLO and consumed then by Discover using the IoC principle. ## 🖼️ Screenshots ### Observability project solution - show new menu <img width="3004" alt="Screenshot 2024-11-06 at 12 37 02" src="https://github.com/user-attachments/assets/d70b532d-1889-4d5b-b2ee-de2f048560f4"> ### Search project solution - hide new menu <img width="3006" alt="Screenshot 2024-11-06 at 12 36 19" src="https://github.com/user-attachments/assets/660893c3-f6b5-4b06-b8de-50a61a6bdb98"> ### Default navigation mode - hide new menu <img width="3002" alt="Screenshot 2024-11-06 at 12 35 43" src="https://github.com/user-attachments/assets/674c5a08-0084-40e5-ae34-a56c363cacce"> ## 🎥 Demo https://github.com/user-attachments/assets/104e6074-0401-4fd2-a8e6-8b05f2c070d7 --------- Co-authored-by: Marco Antonio Ghiani <[email protected]> Co-authored-by: kibanamachine <[email protected]> (cherry picked from commit 9d38922) # Conflicts: # x-pack/plugins/observability_solution/slo/public/pages/slo_edit/shared_flyout/get_create_slo_flyout.tsx # x-pack/plugins/observability_solution/slo/public/plugin.ts # x-pack/plugins/observability_solution/slo/public/types.ts # x-pack/plugins/observability_solution/slo/tsconfig.json # x-pack/test_serverless/functional/test_suites/common/discover_ml_uptime/discover/search_source_alert.ts
…198987) (#200145) # Backport This will backport the following commits from `main` to `8.x`: - [[One Discover] Add app menu actions for Observability projects (#198987)](#198987) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Marco Antonio Ghiani","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-14T10:00:38Z","message":"[One Discover] Add app menu actions for Observability projects (#198987)\n\n## 📓 Summary\r\n\r\nCloses #182230 \r\n\r\nThis work introduces a new observability root profile and uses the new\r\nextension point to register custom actions on the app menu.\r\nThe registered actions and link will appear only with the new project\r\nnavigation enabled on an Observability project:\r\n- A link to the data sets quality page\r\n- On the alerts sub menu...\r\n- replace the default search rule creation with the observability custom\r\nthreshold rule\r\n - add an entry to directly create an SLO for the current search\r\n\r\nTo access the SLO capabilities without breaking the dependencies\r\nhierarchy of the new sustainable architecture, the feature is registered\r\nby the common plugin `discover-shared` in SLO and consumed then by\r\nDiscover using the IoC principle.\r\n\r\n## 🖼️ Screenshots\r\n\r\n### Observability project solution - show new menu\r\n\r\n<img width=\"3004\" alt=\"Screenshot 2024-11-06 at 12 37 02\"\r\nsrc=\"https://github.com/user-attachments/assets/d70b532d-1889-4d5b-b2ee-de2f048560f4\">\r\n\r\n### Search project solution - hide new menu\r\n\r\n<img width=\"3006\" alt=\"Screenshot 2024-11-06 at 12 36 19\"\r\nsrc=\"https://github.com/user-attachments/assets/660893c3-f6b5-4b06-b8de-50a61a6bdb98\">\r\n\r\n### Default navigation mode - hide new menu\r\n\r\n<img width=\"3002\" alt=\"Screenshot 2024-11-06 at 12 35 43\"\r\nsrc=\"https://github.com/user-attachments/assets/674c5a08-0084-40e5-ae34-a56c363cacce\">\r\n\r\n## 🎥 Demo\r\n\r\n\r\nhttps://github.com/user-attachments/assets/104e6074-0401-4fd2-a8e6-8b05f2c070d7\r\n\r\n---------\r\n\r\nCo-authored-by: Marco Antonio Ghiani <[email protected]>\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"9d38922401d0bbd0d95d750f68fec77ca22758fb","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-logs","Team:obs-ux-management","Project:OneDiscover"],"number":198987,"url":"https://github.com/elastic/kibana/pull/198987","mergeCommit":{"message":"[One Discover] Add app menu actions for Observability projects (#198987)\n\n## 📓 Summary\r\n\r\nCloses #182230 \r\n\r\nThis work introduces a new observability root profile and uses the new\r\nextension point to register custom actions on the app menu.\r\nThe registered actions and link will appear only with the new project\r\nnavigation enabled on an Observability project:\r\n- A link to the data sets quality page\r\n- On the alerts sub menu...\r\n- replace the default search rule creation with the observability custom\r\nthreshold rule\r\n - add an entry to directly create an SLO for the current search\r\n\r\nTo access the SLO capabilities without breaking the dependencies\r\nhierarchy of the new sustainable architecture, the feature is registered\r\nby the common plugin `discover-shared` in SLO and consumed then by\r\nDiscover using the IoC principle.\r\n\r\n## 🖼️ Screenshots\r\n\r\n### Observability project solution - show new menu\r\n\r\n<img width=\"3004\" alt=\"Screenshot 2024-11-06 at 12 37 02\"\r\nsrc=\"https://github.com/user-attachments/assets/d70b532d-1889-4d5b-b2ee-de2f048560f4\">\r\n\r\n### Search project solution - hide new menu\r\n\r\n<img width=\"3006\" alt=\"Screenshot 2024-11-06 at 12 36 19\"\r\nsrc=\"https://github.com/user-attachments/assets/660893c3-f6b5-4b06-b8de-50a61a6bdb98\">\r\n\r\n### Default navigation mode - hide new menu\r\n\r\n<img width=\"3002\" alt=\"Screenshot 2024-11-06 at 12 35 43\"\r\nsrc=\"https://github.com/user-attachments/assets/674c5a08-0084-40e5-ae34-a56c363cacce\">\r\n\r\n## 🎥 Demo\r\n\r\n\r\nhttps://github.com/user-attachments/assets/104e6074-0401-4fd2-a8e6-8b05f2c070d7\r\n\r\n---------\r\n\r\nCo-authored-by: Marco Antonio Ghiani <[email protected]>\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"9d38922401d0bbd0d95d750f68fec77ca22758fb"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/198987","number":198987,"mergeCommit":{"message":"[One Discover] Add app menu actions for Observability projects (#198987)\n\n## 📓 Summary\r\n\r\nCloses #182230 \r\n\r\nThis work introduces a new observability root profile and uses the new\r\nextension point to register custom actions on the app menu.\r\nThe registered actions and link will appear only with the new project\r\nnavigation enabled on an Observability project:\r\n- A link to the data sets quality page\r\n- On the alerts sub menu...\r\n- replace the default search rule creation with the observability custom\r\nthreshold rule\r\n - add an entry to directly create an SLO for the current search\r\n\r\nTo access the SLO capabilities without breaking the dependencies\r\nhierarchy of the new sustainable architecture, the feature is registered\r\nby the common plugin `discover-shared` in SLO and consumed then by\r\nDiscover using the IoC principle.\r\n\r\n## 🖼️ Screenshots\r\n\r\n### Observability project solution - show new menu\r\n\r\n<img width=\"3004\" alt=\"Screenshot 2024-11-06 at 12 37 02\"\r\nsrc=\"https://github.com/user-attachments/assets/d70b532d-1889-4d5b-b2ee-de2f048560f4\">\r\n\r\n### Search project solution - hide new menu\r\n\r\n<img width=\"3006\" alt=\"Screenshot 2024-11-06 at 12 36 19\"\r\nsrc=\"https://github.com/user-attachments/assets/660893c3-f6b5-4b06-b8de-50a61a6bdb98\">\r\n\r\n### Default navigation mode - hide new menu\r\n\r\n<img width=\"3002\" alt=\"Screenshot 2024-11-06 at 12 35 43\"\r\nsrc=\"https://github.com/user-attachments/assets/674c5a08-0084-40e5-ae34-a56c363cacce\">\r\n\r\n## 🎥 Demo\r\n\r\n\r\nhttps://github.com/user-attachments/assets/104e6074-0401-4fd2-a8e6-8b05f2c070d7\r\n\r\n---------\r\n\r\nCo-authored-by: Marco Antonio Ghiani <[email protected]>\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"9d38922401d0bbd0d95d750f68fec77ca22758fb"}}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <[email protected]>
…ic#198987) ## 📓 Summary Closes elastic#182230 This work introduces a new observability root profile and uses the new extension point to register custom actions on the app menu. The registered actions and link will appear only with the new project navigation enabled on an Observability project: - A link to the data sets quality page - On the alerts sub menu... - replace the default search rule creation with the observability custom threshold rule - add an entry to directly create an SLO for the current search To access the SLO capabilities without breaking the dependencies hierarchy of the new sustainable architecture, the feature is registered by the common plugin `discover-shared` in SLO and consumed then by Discover using the IoC principle. ## 🖼️ Screenshots ### Observability project solution - show new menu <img width="3004" alt="Screenshot 2024-11-06 at 12 37 02" src="https://github.com/user-attachments/assets/d70b532d-1889-4d5b-b2ee-de2f048560f4"> ### Search project solution - hide new menu <img width="3006" alt="Screenshot 2024-11-06 at 12 36 19" src="https://github.com/user-attachments/assets/660893c3-f6b5-4b06-b8de-50a61a6bdb98"> ### Default navigation mode - hide new menu <img width="3002" alt="Screenshot 2024-11-06 at 12 35 43" src="https://github.com/user-attachments/assets/674c5a08-0084-40e5-ae34-a56c363cacce"> ## 🎥 Demo https://github.com/user-attachments/assets/104e6074-0401-4fd2-a8e6-8b05f2c070d7 --------- Co-authored-by: Marco Antonio Ghiani <[email protected]> Co-authored-by: kibanamachine <[email protected]>
…ic#198987) ## 📓 Summary Closes elastic#182230 This work introduces a new observability root profile and uses the new extension point to register custom actions on the app menu. The registered actions and link will appear only with the new project navigation enabled on an Observability project: - A link to the data sets quality page - On the alerts sub menu... - replace the default search rule creation with the observability custom threshold rule - add an entry to directly create an SLO for the current search To access the SLO capabilities without breaking the dependencies hierarchy of the new sustainable architecture, the feature is registered by the common plugin `discover-shared` in SLO and consumed then by Discover using the IoC principle. ## 🖼️ Screenshots ### Observability project solution - show new menu <img width="3004" alt="Screenshot 2024-11-06 at 12 37 02" src="https://github.com/user-attachments/assets/d70b532d-1889-4d5b-b2ee-de2f048560f4"> ### Search project solution - hide new menu <img width="3006" alt="Screenshot 2024-11-06 at 12 36 19" src="https://github.com/user-attachments/assets/660893c3-f6b5-4b06-b8de-50a61a6bdb98"> ### Default navigation mode - hide new menu <img width="3002" alt="Screenshot 2024-11-06 at 12 35 43" src="https://github.com/user-attachments/assets/674c5a08-0084-40e5-ae34-a56c363cacce"> ## 🎥 Demo https://github.com/user-attachments/assets/104e6074-0401-4fd2-a8e6-8b05f2c070d7 --------- Co-authored-by: Marco Antonio Ghiani <[email protected]> Co-authored-by: kibanamachine <[email protected]>
📓 Summary
Closes #182230
This work introduces a new observability root profile and uses the new extension point to register custom actions on the app menu.
The registered actions and link will appear only with the new project navigation enabled on an Observability project:
To access the SLO capabilities without breaking the dependencies hierarchy of the new sustainable architecture, the feature is registered by the common plugin
discover-shared
in SLO and consumed then by Discover using the IoC principle.🖼️ Screenshots
Observability project solution - show new menu
Search project solution - hide new menu
Default navigation mode - hide new menu
🎥 Demo
Screen.Recording.2024-11-06.at.12.56.37.mov