[Backport 3.2] Monitoring: Accurately capture predict failures (#4525)#4838
[Backport 3.2] Monitoring: Accurately capture predict failures (#4525)#4838pyek-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>
7db5be8 to
1c2784d
Compare
PR Reviewer Guide 🔍(Review updated until commit 1c2784d)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 1c2784d
Previous suggestionsSuggestions up to commit 1c2784d
|
|
Persistent review updated to latest commit 1c2784d |
|
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