We are experiencing issues with Sentry where certain exceptions are not propagated into Sentry, - more specifically we catch the exception and log some information to the local file system, but do not find any trace of it in Sentry.
This setup works perfectly well for all other exceptions, - hundreds of different exception types, but for a small group of exception types this does not seem to work as intended.
We have been investigating any and all possible causes and eliminated config issues and whatnot being the culprit. What we do see, is a what we believe might be a pattern shared between these problematic exception types, a pattern that amounts to thread abortion and the like. We are talking about TaskCancelled, catastrophic runtime failure causing the process to die in the hardest possible way, ThreadAbort and so on.
Our hypothesis is that the process and/or thread that is supposed to submit the exception/event to Sentry dies before the submission is completed – while the file system logging is fast enough to do its job before the process/thread is dead. We are in a Windows environment, C#, .Net, and are using Sentry SDK for .Net for the submission.
Assuming that our hypothesis is correct, do you have any advice for how to remedy or workaround this phenomenon?