[Backport 3.0] Monitoring: Accurately capture predict failures (#4525)#4840
[Backport 3.0] Monitoring: Accurately capture predict failures (#4525)#4840pyek-bot wants to merge 1 commit into
Conversation
) (opensearch-project#4555) * fix: correctly capture ml failure stats on predict failures * refactor: remove redundant braces * refactor: dont track any 400 errors and add positive test case * fix: apply spotless --------- (cherry picked from commit a28d344) Signed-off-by: Pavan Yekbote <pybot@amazon.com> Co-authored-by: Pavan Yekbote <pybot@amazon.com> Signed-off-by: Pavan Yekbote <pybot@amazon.com>
23463bd to
de51c56
Compare
PR Reviewer Guide 🔍(Review updated until commit de51c56)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to de51c56
Previous suggestionsSuggestions up to commit de51c56
|
|
Persistent review updated to latest commit de51c56 |
|
Spotless failing due to: |
Summary
shouldTrackRemoteFailure(Exception e)method that skips tracking for user/configuration issues (4xx HTTP errors,IllegalArgumentException) while still tracking infrastructure/service issues (5xx errors, other exceptions)runPredictthat previously hard-codedfalse(never tracking remote failures)Test plan
testShouldTrackRemoteFailurevalidates all scenarios