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

[ML] AiOps: Action for adding Log Pattern embeddable to a dashboard and case #198793

Closed
wants to merge 14 commits into from

Conversation

rbrtj
Copy link
Contributor

@rbrtj rbrtj commented Nov 4, 2024

Summary

Part of #197247

  • Added the ability to add a Log Pattern Embeddable to a dashboard and case.

  • Fixed the Change Point Detection embeddable in cases and added a functional test to cover this scenario.

Screen.Recording.2024-11-06.at.13.58.01.mov

Checklist

Delete any items that are not applicable to this PR.

@@ -101,10 +101,6 @@ export const ChartGridEmbeddableWrapper: FC<ChangePointDetectionProps> = ({
10000
);

useEffect(() => {
Copy link
Contributor Author

@rbrtj rbrtj Nov 4, 2024

Choose a reason for hiding this comment

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

It was causing an error because onLoading is not defined for the chart change point embeddable component.
image

const isCasesEmbeddable = embeddingOrigin === AIOPS_EMBEDDABLE_ORIGIN.CASES;

// Disable filtering for cases embeddable, as it's not possible to delete filters
const actions = [...(isCasesEmbeddable ? [] : getActions(false)), ...getActions(true)];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It disables filtering for a pattern in cases. In dashboards, it is possible to delete a filter, but there is currently no such option in cases. I have disabled it for now, but it would be nice to have that option available inside the embeddable.


return (
<>
<FieldValidationCallout validationResults={fieldValidationResult} />
{(loading ?? true) === true ? <LoadingCategorization onCancel={cancelRequest} /> : null}
{(loading ?? true) === true ? (
<LoadingCategorization onCancel={cancelRequest} disableCancelLoading={isCasesEmbeddable} />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Disabled cancel loading in cases because it is not possible to refresh the embeddable. Therefore, after canceling, the embeddable would get stuck without results.

@rbrtj rbrtj changed the title add to dashboard and case action for log pattern [ML] AiOps: Action for adding Log Pattern embeddable to a dashboard and case Nov 6, 2024
@rbrtj rbrtj added release_note:enhancement :ml v9.0.0 Team:ML Team label for ML (also use :ml) Feature:ML/AIOps ML AIOps features: Change Point Detection, Log Pattern Analysis, Log Rate Analysis backport:version Backport to applied version labels v8.17.0 labels Nov 6, 2024
@rbrtj rbrtj self-assigned this Nov 6, 2024
@rbrtj rbrtj marked this pull request as ready for review November 6, 2024 13:04
@rbrtj rbrtj requested a review from a team as a code owner November 6, 2024 13:04
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@peteharverson peteharverson requested review from jgowdyelastic and removed request for peteharverson November 6, 2024 14:27
@rbrtj rbrtj requested a review from a team as a code owner November 8, 2024 09:48
rbrtj and others added 4 commits November 8, 2024 10:48
Fixes elastic#192804

This PR updates the nav hierarchy on serverless and changes the
`accordion` to `panelOpener`. The menu items have been updated according
to the [Figma
file](https://www.figma.com/design/IAR7FjBaSCDWypNYL83fzy/Observability-Navigation?node-id=1232-10087&node-type=frame&t=AMlUqaK2UhhiyqGi-0).
Here's a Video of how nav hierarchy looks like on serverless with the
new changes:


https://github.com/user-attachments/assets/55d04969-379e-4cd1-8e25-d50382cf51e0

## What was changed

- AI & ML menu is removed and split into
  - `AI Assistant`
  - `Machine learning`
- `Applications` now opens a `panelOpener` instead of an `accordion`
- `Service Inventory` was renamed to `Service inventory` to meet the use
of sentence-case requirement
  - Synthetics was moved to a new section
- `Infrastructure`
- `Infrastructure Inventory` was renamed to `Infrastructure inventory`
to match the sentence-case requirement
-  `Machine learning`: this menu was not present at all on serverless 

## Notes for the Reviewer

- `Stack Management` on security and search don't use any `panelOpener`,
they use a landing page instead. In order to be consistent with the rest
solutions, I kept Stack Management as is.
- `Machine Learning` menu item was not present at all on serverless. I
need a confirmation, that it is fine to bring it in as it is from
stateful cc @vinaychandrasekhar

---------

Co-authored-by: Elastic Machine <[email protected]>
Part of elastic#194171.

The AIOps plugin loads quite some bundle chunks on the first Kibana
load. On main it currently looks like this on page load:

![CleanShot 2024-11-04 at 14 56
52@2x](https://github.com/user-attachments/assets/cbabeaa2-848c-4970-aea5-b06befed0bec)

This means while the `aiops.plugin.js` bundle has just 10KB, we load
290KB in total via async bundles on every Kibana full page load.

This PR refactors how embeddables and UI actions get initialized to
avoid loading any additional async bundles on page load. This increases
`aiops.plugin.js` to ~15KB, but gets rid of all the rest!

![CleanShot 2024-11-04 at 15 02
10@2x](https://github.com/user-attachments/assets/557e240f-2c1c-434d-a936-dddb11ab68b6)

- [ ] [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
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)
@rbrtj rbrtj requested review from a team as code owners November 8, 2024 13:25
@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Nov 8, 2024
Copy link
Contributor

github-actions bot commented Nov 8, 2024

🤖 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!)

Copy link
Member

@dmlemeshko dmlemeshko left a comment

Choose a reason for hiding this comment

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

x-pack/test_serverless/functional/services changes LGTM

@rbrtj
Copy link
Contributor Author

rbrtj commented Nov 8, 2024

Sorry for the ping! I messed something up in the Git history, so I'm closing the PR for now.

@rbrtj rbrtj closed this Nov 8, 2024
@elasticmachine
Copy link
Contributor

elasticmachine commented Nov 8, 2024

💔 Build Failed

Failed CI Steps

History

cc @rbrtj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels ci:project-deploy-observability Create an Observability project Feature:ML/AIOps ML AIOps features: Change Point Detection, Log Pattern Analysis, Log Rate Analysis :ml release_note:enhancement Team:ML Team label for ML (also use :ml)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants