Unwrap the cause (inner exception) of operation canceled exceptions when reporting faults#61787
Conversation
sharwell
left a comment
There was a problem hiding this comment.
OperationCanceledException can occur on both normal cancellation paths and error paths. Currently we only report them on error paths, where it's not required to omit them.
sharwell
left a comment
There was a problem hiding this comment.
I misinterpreted the original change and reworded the title to avoid confusion. One simplification given in code.
|
Won't we start reporting ConnectionLostExceptions (that are wrapped in OperationCanceledException) if this is merged? These are expected exceptions that occur on shutdown and they may get wrapped in OperationCanceledException and get reported if cancellation token is not signaled when ReportAndPropagateUnlessCanceled is called with cancellation token. |
|
This is assuming all of the cancellation exceptions getting reported are wrapping a ConnectionLostException. Also, it'd be fine to skip reporting for ConnectionLostException when the current process is the ServiceHub process (ConnectionLostException is a more targeted exclusion than OperationCanceledException). |
|
The motivation for adding Are there any other cases when we are wrapping exceptions to OCE? |
Co-authored-by: Sam Harwell <sam@tunnelvisionlabs.com>
If we want to avoid reporting specific exceptions as faults we should filter there instead of The goal of this is specifically around fault reporting. OCE is resulting in millions of events of unactionable data and bucketed in ways we can't root cause. This will, at the very least, give us a clearer picture of root causing. |
Yes, some of these (maybe most?) because we are wrapping ConnectionLostException in OCE today and then reporting it form If we just unwrap this OCE and do nothing else we will continue having these unactionable NFEs, just with ConnectionLostException instead of OCE |
|
Once #61792 is merged I think we shouldn't be seeing any OCE wrapping another exception being reported via NFE. |
I think we should still take this change though. Having the inner exception unwrapped for OCE is more useful than ever reporting OCE for faults |
|
Maybe, but there are no other cases where we wrap an exception to OCE in Roslyn. |
yet :) |
|
/azp run |
|
Azure Pipelines successfully started running 4 pipeline(s). |
Fixes AB#1212299