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

[AIOps] Explain Log Rate Spikes: create shareable component containing only analysis #158629

Merged

Conversation

alvarezmelissa87
Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 commented May 29, 2023

Summary

This PR exposes the ExplainLogRateSpikesContent shared component so that it can be used independently of the search bar/datepicker

  • The component accepts various external settings including a timerange and query to run the analysis against.
  • The ExplainLogRateSpikesPage component now uses the ExplainLogRateSpikesContent component
  • The useData hook has been simplified - the set up for the search query has been extracted into a separate hook
image

This is the first step for the Observability Alert Details Page Integration.

Style edits:

The component now uses EUI's ResizeableContainer to allow the main histogram to be sticky.
Also adds some style updates from #156605

Checklist

Delete any items that are not applicable to this PR.

@alvarezmelissa87 alvarezmelissa87 added release_note:enhancement :ml Feature:ML/AIOps ML AIOps features: Change Point Detection, Log Pattern Analysis, Log Rate Analysis v8.9.0 labels May 29, 2023
@alvarezmelissa87 alvarezmelissa87 self-assigned this May 29, 2023
@alvarezmelissa87 alvarezmelissa87 requested a review from a team as a code owner May 29, 2023 17:31
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@alvarezmelissa87
Copy link
Contributor Author

cc @benakansara

)}
<EuiHorizontalRule />
</EuiResizablePanel>
{/* <EuiResizableButton /> */}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this for a follow-up allowing the two panels to be resized?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes - just too much code churn to add in here 👍

}

return (
<EuiResizableContainer style={{ height: '400px' }} direction="vertical">
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you have to specify a height here? Can it have a responsive layout so that it adapts to the available screen height?

<EuiResizablePanel
paddingSize="s"
mode={'main'}
initialSize={80}
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't the two values for initialSize add up to 100%?

<>
<EuiResizablePanel
mode={'collapsible'}
initialSize={60}
Copy link
Contributor

Choose a reason for hiding this comment

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

This panel is always getting a scrollbar for me. Does the initialSize or minSize need to be larger?

Copy link
Contributor

@walterra walterra left a comment

Choose a reason for hiding this comment

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

LGTM, pending fixed functional tests and fixing the scrollbar regression.

Comment on lines +69 to +70
const resultsGroupedOffId = 'aiopsExplainLogRateSpikesGroupingOff';
const resultsGroupedOnId = 'aiopsExplainLogRateSpikesGroupingOn';
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Could be RESULTS_GROUPING_ID_OFF/ON as a const and to match the id a bit more.

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.

LGTM. Re-enable the resizable panel layout in a follow-up PR.

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
aiops 515 519 +4

Async chunks

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

id before after diff
aiops 795.1KB 803.8KB +8.7KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
aiops 0 1 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
aiops 6.0KB 6.2KB +197.0B
Unknown metric groups

API count

id before after diff
aiops 39 41 +2

async chunk count

id before after diff
aiops 5 7 +2

ESLint disabled line counts

id before after diff
aiops 24 23 -1
enterpriseSearch 19 21 +2
securitySolution 401 405 +4
total +5

Total ESLint disabled count

id before after diff
aiops 24 23 -1
enterpriseSearch 20 22 +2
securitySolution 481 485 +4
total +5

History

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

cc @alvarezmelissa87

@alvarezmelissa87 alvarezmelissa87 merged commit 03d4fe7 into elastic:main May 30, 2023
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label May 30, 2023
@alvarezmelissa87 alvarezmelissa87 deleted the aiops-for-observability branch May 30, 2023 19:45
@peteharverson peteharverson added release_note:skip Skip the PR/issue when compiling release notes and removed release_note:enhancement labels Jun 7, 2023
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:skip Skip the PR/issue when compiling release notes v8.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants