-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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: Fix error handling. #142047
[ML] Explain Log Rate Spikes: Fix error handling. #142047
Conversation
d40f40d
to
3f7b3b6
Compare
Pinging @elastic/ml-ui (:ml) |
...plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes_analysis.tsx
Outdated
Show resolved
Hide resolved
logger.error( | ||
`Failed to transform field/value pairs into groups, got: \n${e.toString()}` | ||
); | ||
pushError(`Failed to transform field/value pairs into groups.`); |
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.
typo: there's an extra space here after 'pairs'
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.
Fixed in c9eed74.
} catch (e) { | ||
logger.error(`Failed to fetch the overall histogram data, got: \n${e.toString()}`); | ||
pushError(`Failed to fetch overall histogram data.`); | ||
// Still continue the analysis even if loading the overall histogram failes. |
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.
typo: failes
-> fails
+ suggestion to internationalize this message
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.
Fixed typo in c9eed74. i18n will be done in a follow up.
@qn895 Thanks for the review, this is ready for another look! |
@@ -35,6 +35,9 @@ export function streamReducer( | |||
return action.reduce(streamReducer, state); | |||
} | |||
|
|||
// eslint-disable-next-line no-console | |||
console.log('action', action); |
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.
I'm assuming this console.log is here intentionally... In which case might be good to have a better log prefix message. But this is a super duper nit and is not an issue. Please feel free to merge 😄 .
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.
Sorry for not mentioning this, it's just for some temporary cloud testing and will be deleted before merging!
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.
Removed in 2bc9fce.
Code LGTM 🎉 |
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
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @walterra |
- Fixes error handling that before was not providing enough information for debugging purposes and support. This will now output more fine grained error information to the Kibana server log. The analysis is now more resilient to errors for individual queries. For example, we don't stop the analysis anymore if individual queries for p-values or histograms fail. - Moves the error callout above all other possible elements like empty prompts when the analysis doesn't return results. (cherry picked from commit 4753d7c)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
- Fixes error handling that before was not providing enough information for debugging purposes and support. This will now output more fine grained error information to the Kibana server log. The analysis is now more resilient to errors for individual queries. For example, we don't stop the analysis anymore if individual queries for p-values or histograms fail. - Moves the error callout above all other possible elements like empty prompts when the analysis doesn't return results. (cherry picked from commit 4753d7c) Co-authored-by: Walter Rafelsberger <walter.rafelsberger@elastic.co>
- Fixes error handling that before was not providing enough information for debugging purposes and support. This will now output more fine grained error information to the Kibana server log. The analysis is now more resilient to errors for individual queries. For example, we don't stop the analysis anymore if individual queries for p-values or histograms fail. - Moves the error callout above all other possible elements like empty prompts when the analysis doesn't return results.
- Fixes error handling that before was not providing enough information for debugging purposes and support. This will now output more fine grained error information to the Kibana server log. The analysis is now more resilient to errors for individual queries. For example, we don't stop the analysis anymore if individual queries for p-values or histograms fail. - Moves the error callout above all other possible elements like empty prompts when the analysis doesn't return results.
Summary
Part of #138117.
Checklist