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: Identify spike/dips with change point detection for log rate analysis #178338

Merged
merged 19 commits into from
Mar 27, 2024

Conversation

walterra
Copy link
Contributor

@walterra walterra commented Mar 8, 2024

Summary

  • Uses change point detection to identify point in time for deviation timestamp.
  • Expands deviation timestamp into time range covering the whole deviation area of interest and highlights the time range in the date histogram chart.
  • When clicking on the detected deviation time range, the selected deviation will be exactly the detected time range.
  • If no change point is detected, we just fall back to the previous behavior.

Review notes:

  • For the obs-ux team it's just some imports that needed to be updated.

image

image

image

image

Checklist

@walterra walterra self-assigned this Mar 8, 2024
@walterra walterra force-pushed the ml-aiops-lra-with-cp branch from 295cdd3 to 80cace8 Compare March 12, 2024 12:57
@walterra walterra force-pushed the ml-aiops-lra-with-cp branch from 80cace8 to 1d9d862 Compare March 19, 2024 13:27
@walterra walterra added :ml Feature:ML/AIOps ML AIOps features: Change Point Detection, Log Pattern Analysis, Log Rate Analysis v8.14.0 release_note:enhancement labels Mar 19, 2024
@walterra walterra force-pushed the ml-aiops-lra-with-cp branch from 9880442 to 2de7f71 Compare March 20, 2024 17:59
@walterra
Copy link
Contributor Author

walterra commented Mar 21, 2024

@walterra walterra marked this pull request as ready for review March 21, 2024 13:20
@walterra walterra requested review from a team as code owners March 21, 2024 13:20
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@peteharverson
Copy link
Contributor

A good enhancement! Some feedback on the selection and messaging:

  • I think we need some extra help to indicate what is being displayed after selection of the data view - as in we've auto-detected the most significant deviation. Could the 'Run analysis' be added to this sort of prompt?
Screenshot 2024-03-22 at 12 20 13
  • Should the change point highlight be dropped once the analysis starts running? I find it slightly confusing that if I choose to select a different spike or dip that the auto-selected range stays highlighted. Somewhat contrived example below, but you get my point...
Screenshot 2024-03-22 at 12 16 18
  • Should hitting 'Reset' also remove the auto-detected change point?

  • Saw this example in the o11y log threshold alert details page (again somewhat contrived example), where the auto-detected spike ends up in the deviation range:

Screenshot 2024-03-22 at 12 36 49

Copy link
Member

@maryam-saeidi maryam-saeidi left a comment

Choose a reason for hiding this comment

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

Import changes LGTM!

@botelastic botelastic bot added the Team:obs-ux-management Observability Management User Experience Team label Mar 25, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

@walterra
Copy link
Contributor Author

walterra commented Mar 25, 2024

@peteharverson Good input!

I updated the behavior:

  • Detected change points will only be highlighted when the analysis hasn't been run yet. That should avoid the confusion if you intentionally select another time range as well as the highlighting in alerting.
  • The prompts were updated to show an adapted version if we detect a spike or dip including a button to run the analysis.

Custom prompt when we detect a change point:

image

Change point highlighting disabled when user selected another time range:

image

@peteharverson
Copy link
Contributor

Maybe it's because I'm used to it, but should we show the brushes for the baseline and deviation when the analysis is run on the auto-detected spike / dip?
Screenshot 2024-03-26 at 12 04 52

@walterra
Copy link
Contributor Author

@peteharverson thanks for catching that! The brushes not showing up should be fixed now in d8daf32.

const wpSnap = getSnappedWindowParameters(wp, snapTimestamps);

if (brushSelectionUpdate !== undefined) {
setInitialAnalysisStart(wpSnap);
Copy link
Contributor

Choose a reason for hiding this comment

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

The brushes are now appearing, but the 'Run analysis' button goes into the 'update needed' state:
Screenshot 2024-03-26 at 14 28 47

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should be fixed now in d754830, ready for another look!

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

Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 left a comment

Choose a reason for hiding this comment

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

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 485 490 +5
dataVisualizer 637 642 +5
total +10

Async chunks

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

id before after diff
aiops 408.7KB 411.6KB +2.9KB
Unknown metric groups

API count

id before after diff
@kbn/aiops-components 35 36 +1
@kbn/aiops-utils 20 41 +21
total +22

History

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

cc @walterra

@walterra walterra merged commit 176ea27 into elastic:main Mar 27, 2024
16 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Mar 27, 2024
@walterra walterra deleted the ml-aiops-lra-with-cp branch March 27, 2024 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:ML/AIOps ML AIOps features: Change Point Detection, Log Pattern Analysis, Log Rate Analysis :ml release_note:enhancement Team:obs-ux-management Observability Management User Experience Team v8.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants