opentelemetry-dotnet-instrumentation
opentelemetry-dotnet-instrumentation copied to clipboard
Policy regarding catching all possible exceptions
trafficstars
Do we know the possible exceptions? we do not want to catch exceptions like OutOfMemoryException?
The same comment applies to other catch statements in this PR.
As for me, it can be addressed in another PR. But I guess it should be addressed.
Originally posted by @pellared in https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/pull/456#discussion_r847521868
SIG meeting:
- during the bootstrapping/initialization we can handle all exceptions. The .NET runtime handles
OutOfMemoryException,StackoverflowExcceptionetc in a special way so it will not be caught bycatch. - TODO: review all code with
catch
I reviewed all code with catch and I have not found any issue.