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: Fix to not run log rate analysis twice when no spike/dip detected. #180980

Merged
merged 15 commits into from
Apr 18, 2024

Conversation

walterra
Copy link
Contributor

@walterra walterra commented Apr 16, 2024

Summary

Part of #172981.
Part of #153753.

This fixes to not run log rate analysis twice when no spike/dip detected and a user needs to adapt the initial selection. When a user clicks in an area of the histogram chart that's not a highlighted change point, the click will just trigger the baseline/deviation time range selection, but it will not automatically run the analysis. Instead, an updated prompt is shown below the chart that explains that the baseline/deviation can be adjusted via dragging and the analysis can be run via the button below that description.

Initial view after loading the page:

image

User clicked in an area that's not covered by the highlighted change point:

image

Checklist

Delete any items that are not applicable to this PR.

@walterra walterra self-assigned this Apr 16, 2024
@walterra walterra added :ml v8.14.0 Feature:ML/AIOps ML AIOps features: Change Point Detection, Log Pattern Analysis, Log Rate Analysis release_note:enhancement labels Apr 16, 2024
@walterra walterra marked this pull request as ready for review April 16, 2024 21:45
@walterra walterra requested a review from a team as a code owner April 16, 2024 21:45
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@walterra
Copy link
Contributor Author

walterra commented Apr 17, 2024

Need to wait for this PR with the chromedriver update to be merged before I can fix functional tests: #181002

@walterra walterra changed the title [ML] AIOps: Do not run auto-run log rate analysis when no spike/dip detected. [ML] AIOps: Do not auto-run log rate analysis when no spike/dip detected. Apr 17, 2024
@peteharverson
Copy link
Contributor

peteharverson commented Apr 17, 2024

With data sets such as partial-.ds-cluster-kibana-filebeat-*, or gallery, where there are no auto detected spikes or dips, hitting the Run analysis button fails to start the analysis. No errors in the browser console.

@peteharverson
Copy link
Contributor

For the case where we auto-detect a spike / dip, if you then click inside the selected spike the analysis runs without having to hit the button. Should we change this behavior to be consistent with clicking outside the selected range?

@walterra
Copy link
Contributor Author

walterra commented Apr 17, 2024

@peteharverson My understanding was that the original concern was that we have to run the analysis twice if a user wants to tweak the brush selection because the original selection wasn't good enough. When a user clicks on highlighted bars that are part of a detected change point, we can make a better selection based on the change point boundaries. So it's less likely the brushes need to be adjusted. Considering that I think we should auto-run the analysis is such a case, what do you think? Doing it like that, the "Run analysis" button and clicking on highlighted bars in the histogram have the same result.

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

Tested latest changes and LGTM.

@walterra
Copy link
Contributor Author

@darnautov thanks for the feedback, addressed your comments, ready for another look!

@walterra walterra requested a review from a team as a code owner April 17, 2024 14:24
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/performance/journeys_e2e/aiops_log_rate_analysis.ts changes LGTM

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
aiops 487 488 +1
dataVisualizer 658 660 +2
total +3

Async chunks

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

id before after diff
aiops 411.5KB 413.2KB +1.7KB
Unknown metric groups

API count

id before after diff
@kbn/aiops-components 36 51 +15

ESLint disabled line counts

id before after diff
aiops 24 25 +1

Total ESLint disabled count

id before after diff
aiops 24 25 +1

History

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

cc @walterra

@walterra walterra changed the title [ML] AIOps: Do not auto-run log rate analysis when no spike/dip detected. [ML] AIOps: Fix to not run log rate analysis twice when no spike/dip detected. Apr 18, 2024
@walterra
Copy link
Contributor Author

walterra commented Apr 18, 2024

✅ 25x Flaky Test Runner for Functional Tests/API Integration Tests/Performance Journey https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5713

Copy link
Contributor

@darnautov darnautov left a comment

Choose a reason for hiding this comment

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

LGTM

@walterra walterra merged commit 6fdcd8d into elastic:main Apr 18, 2024
23 checks passed
@walterra walterra deleted the ml-aiops-lra-additional-click branch April 18, 2024 09:35
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 18, 2024
…detected. (elastic#180980)

## Summary

Part of elastic#172981.

This fixes to not run log rate analysis twice when no spike/dip detected
and a user needs to adapt the initial selection. When a user clicks in
an area of the histogram chart that's not a highlighted change point,
the click will just trigger the baseline/deviation time range selection,
but it will not automatically run the analysis. Instead, an updated
prompt is shown below the chart that explains that the
baseline/deviation can be adjusted via dragging and the analysis can be
run via the button below that description.

Initial view after loading the page:

<img width="1040" alt="image"
src="https://github.com/elastic/kibana/assets/230104/90e8c390-af2a-45e2-8d11-cfd42285200b">

User clicked in an area that's not covered by the highlighted change
point:

<img width="1026" alt="image"
src="https://github.com/elastic/kibana/assets/230104/050a07e0-c5e6-4639-a854-83fae10b125b">

### Checklist

Delete any items that are not applicable to this PR.

- [x] 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)
- [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
- [x] 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)

(cherry picked from commit 6fdcd8d)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.14

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 Apr 18, 2024
…ke/dip detected. (#180980) (#181128)

# Backport

This will backport the following commits from `main` to `8.14`:
- [[ML] AIOps: Fix to not run log rate analysis twice when no spike/dip
detected. (#180980)](#180980)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Walter
Rafelsberger","email":"walter.rafelsberger@elastic.co"},"sourceCommit":{"committedDate":"2024-04-18T09:35:16Z","message":"[ML]
AIOps: Fix to not run log rate analysis twice when no spike/dip
detected. (#180980)\n\n## Summary\r\n\r\nPart of #172981.\r\n\r\nThis
fixes to not run log rate analysis twice when no spike/dip
detected\r\nand a user needs to adapt the initial selection. When a user
clicks in\r\nan area of the histogram chart that's not a highlighted
change point,\r\nthe click will just trigger the baseline/deviation time
range selection,\r\nbut it will not automatically run the analysis.
Instead, an updated\r\nprompt is shown below the chart that explains
that the\r\nbaseline/deviation can be adjusted via dragging and the
analysis can be\r\nrun via the button below that
description.\r\n\r\nInitial view after loading the page:\r\n\r\n<img
width=\"1040\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/230104/90e8c390-af2a-45e2-8d11-cfd42285200b\">\r\n\r\nUser
clicked in an area that's not covered by the highlighted
change\r\npoint:\r\n\r\n<img width=\"1026\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/230104/050a07e0-c5e6-4639-a854-83fae10b125b\">\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\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- [x] This was
checked for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"6fdcd8d7b80515ce9361666f5264f8966d9b54e7","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Feature:ML/AIOps","v8.14.0","v8.15.0"],"title":"[ML]
AIOps: Fix to not run log rate analysis twice when no spike/dip
detected.","number":180980,"url":"#180980
AIOps: Fix to not run log rate analysis twice when no spike/dip
detected. (#180980)\n\n## Summary\r\n\r\nPart of #172981.\r\n\r\nThis
fixes to not run log rate analysis twice when no spike/dip
detected\r\nand a user needs to adapt the initial selection. When a user
clicks in\r\nan area of the histogram chart that's not a highlighted
change point,\r\nthe click will just trigger the baseline/deviation time
range selection,\r\nbut it will not automatically run the analysis.
Instead, an updated\r\nprompt is shown below the chart that explains
that the\r\nbaseline/deviation can be adjusted via dragging and the
analysis can be\r\nrun via the button below that
description.\r\n\r\nInitial view after loading the page:\r\n\r\n<img
width=\"1040\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/230104/90e8c390-af2a-45e2-8d11-cfd42285200b\">\r\n\r\nUser
clicked in an area that's not covered by the highlighted
change\r\npoint:\r\n\r\n<img width=\"1026\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/230104/050a07e0-c5e6-4639-a854-83fae10b125b\">\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\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- [x] This was
checked for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"6fdcd8d7b80515ce9361666f5264f8966d9b54e7"}},"sourceBranch":"main","suggestedTargetBranches":["8.14"],"targetPullRequestStates":[{"branch":"8.14","label":"v8.14.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/180980","number":180980,"mergeCommit":{"message":"[ML]
AIOps: Fix to not run log rate analysis twice when no spike/dip
detected. (#180980)\n\n## Summary\r\n\r\nPart of #172981.\r\n\r\nThis
fixes to not run log rate analysis twice when no spike/dip
detected\r\nand a user needs to adapt the initial selection. When a user
clicks in\r\nan area of the histogram chart that's not a highlighted
change point,\r\nthe click will just trigger the baseline/deviation time
range selection,\r\nbut it will not automatically run the analysis.
Instead, an updated\r\nprompt is shown below the chart that explains
that the\r\nbaseline/deviation can be adjusted via dragging and the
analysis can be\r\nrun via the button below that
description.\r\n\r\nInitial view after loading the page:\r\n\r\n<img
width=\"1040\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/230104/90e8c390-af2a-45e2-8d11-cfd42285200b\">\r\n\r\nUser
clicked in an area that's not covered by the highlighted
change\r\npoint:\r\n\r\n<img width=\"1026\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/230104/050a07e0-c5e6-4639-a854-83fae10b125b\">\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\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- [x] This was
checked for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"6fdcd8d7b80515ce9361666f5264f8966d9b54e7"}}]}]
BACKPORT-->

Co-authored-by: Walter Rafelsberger <walter.rafelsberger@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:ML/AIOps ML AIOps features: Change Point Detection, Log Pattern Analysis, Log Rate Analysis :ml release_note:fix v8.14.0 v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants