-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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: Link from Explain Log Rate Spikes to Log Pattern Analysis #155121
[ML] AIOps: Link from Explain Log Rate Spikes to Log Pattern Analysis #155121
Conversation
48a1ee1
to
6fee2b8
Compare
Pinging @elastic/ml-ui (:ml) |
Flaky test runner: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2151 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and overall looks good.
The fact that the link is opening in the same tab highlights the fact that we don't store the state of the analysis in the URL, or the results of the analysis. This means if you hit 'back' in the browser you have to run the analysis all over again.
I also couldn't find a way of opening the link in a new tab, which would make a workflow of running log pattern analysis on different groups / items easier.
return ( | ||
<TableActionButton | ||
dataTestSubjPostfix="LogPatternAnalysis" | ||
iconType="logstashQueue" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not easy choosing a suitable icon for this action! The only other EUI one I thought might be suitable was list
.
|
||
const mlLocator = useMemo(() => share.url.locators.get('ML_APP_LOCATOR'), [share.url.locators]); | ||
|
||
const generateLogPatternAnalysisUrl = async ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that browsers can generally handle URLs 32k more in length, I guess we don't need to worry too much about how long the URL that can be generated here could be? I got up to 5000 chars for a group of 23 items.
@peteharverson The behavior is the same like with the already existing link to Discover. The way it's implemented I don't see a quick fix to open in a new tab or support the back button to retain the analysis, that's something we need to follow up on with additional work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a couple of comments, but generally LGTM
dataTestSubjPostfix: string; | ||
isDisabled: boolean; | ||
label: string; | ||
message?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, maybe tooltipText
or something similar would be a more descriptive name for this prop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in ab28bf2.
|
||
return { | ||
render: (tableItem: SignificantTerm | GroupTableItem) => { | ||
const message = logPatternAnalysisUrlError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logPatternAnalysisUrlError
is always undefined
, is the logic which uses this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh good catch, I missed updating that. I updated with some error handling inspired by the Discover action in ab28bf2.
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @walterra |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
We should definitely look to store the state of the view in the URL, and even cache the results of the analysis somehow to improve that 'back' button behavior, for a future enhancement.
Summary
Adds table actions to Explain Log Rate Spikes to be able to drill down to Log Pattern Analysis.
Checklist