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] Explain Log Rate Spikes: adds popover to analysis table for viewing other field values #154689

Merged

Conversation

alvarezmelissa87
Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 commented Apr 10, 2023

Summary

Related meta issue: #146065

Adds unified field list popover to show top values for fields in the Explain Log Rate Spikes analysis table.

image

Field pairs table:

image

image

Expanded row in grouped table:

image

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.8.0 labels Apr 10, 2023
@alvarezmelissa87 alvarezmelissa87 self-assigned this Apr 10, 2023
@alvarezmelissa87 alvarezmelissa87 requested a review from a team as a code owner April 10, 2023 22:13
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

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.

Great addition! Some things I noticed:

Layout nitpick: The popover icon has an influence on the upper padding of the field name cell so the text appears lower than in the field value cell.

image

With the icon after the field name, if you want to walk through the rows quickly and inspect the field statistics, it requires quite some targeting with the mouse. If the icon was before the field name it would be easier with vertically aligned icons. Not sure but maybe it's worth moving the icon to its own column, that would also solve the problem with vertical alignment?

image

One final thought: The field/value badges in the groups table themselves could be clickable and trigger the popover for that field.

button={trigger}
renderHeader={() => <FieldPopoverHeader field={fieldForStats} closePopover={closePopover} />}
renderContent={() => (
<>
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Only one element in there so we could remove the <> wrapper.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed in a44cade

@@ -284,13 +285,19 @@ export const ExplainLogRateSpikesAnalysis: FC<ExplainLogRateSpikesAnalysisProps>
groupTableItems={groupTableItems}
loading={isRunning}
dataViewId={dataView.id}
dataView={dataView}
Copy link
Contributor

Choose a reason for hiding this comment

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

If we need to pass in the full dataView let's try to get rid of the dataViewId prop and access the id from dataView within the component.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed in a44cade

/>
) : null}
{showSpikeAnalysisTable && (!groupResults || !foundGroups) ? (
<SpikeAnalysisTable
significantTerms={data.significantTerms}
loading={isRunning}
dataViewId={dataView.id}
dataView={dataView}
Copy link
Contributor

Choose a reason for hiding this comment

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

If we need to pass in the full dataView let's try to get rid of the dataViewId prop and access the id from dataView within the component.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch - removed in a44cade

@alvarezmelissa87
Copy link
Contributor Author

@walterra - thanks for giving this a test! 🙏 Fixed the alignment issue in a44cade
As far as making the badges clickable - I think it's better to keep using the icon we're using everywhere else to be consistent and so users already know what to expect when they see it.

@peteharverson peteharverson changed the title [ML] Explain Log Rate Spikes: add unified fields popover to analysis table fields [ML] Explain Log Rate Spikes: add popover to analysis table for viewing other field values Apr 13, 2023
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

@qn895
Copy link
Member

qn895 commented Apr 13, 2023

Code LGTM 🎉

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.

Overall LGTM - We should update the color of the highlighted field/value pair in the popover to match the highlight color in the mini histograms and overall histogram.

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
aiops 490 493 +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 766.1KB 769.8KB +3.7KB

Page load bundle

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

id before after diff
aiops 5.3KB 5.4KB +146.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 432 435 +3

Total ESLint disabled count

id before after diff
securitySolution 512 515 +3

History

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

cc @alvarezmelissa87

@alvarezmelissa87 alvarezmelissa87 merged commit ec0a87c into elastic:main Apr 17, 2023
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Apr 17, 2023
@alvarezmelissa87 alvarezmelissa87 deleted the ml-aiops-unified-fields branch April 17, 2023 19:50
@szabosteve szabosteve changed the title [ML] Explain Log Rate Spikes: add popover to analysis table for viewing other field values [ML] Explain Log Rate Spikes: adds popover to analysis table for viewing other field values Apr 21, 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:enhancement v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants