Can Application Insights track crashes when a process terminated?

37 views Asked by At

I have read that Application Insights distinguish between Exceptions and "Crashes" (Unhandled exceptions that lead to process termination).

If you create a .NET app then you'd usually have a global handler for all exceptions. That way you can report nearly any exception to AppInsights. But the app can still crash in the sense that not all exceptions can be handled by a global exception handler, and will terminate the app directly. The typical causes would be stack overflow exceptions in user code, exceptions in runtime code, and similar. Basically, anything that kills the runtime obviously also kills the possibility of running the exception handler.

Reporting exceptions in a global exception handler is easy enough. But that still doesn't report any of the actual crashes described above, in an app with a global exception handler. Of course, reporting such crashes would require having some stateful logging of what process ran when and then matching these on the next run of the process (since app insights is running inside the process that crashed), to some event describing the termination e.g. in the Windows Event Log. Can AppInsights do this or would I have to implement this myself and "Crashes" in app insights really just means "Exceptions you could have caught with a global exception handler, but didn't"?

0

There are 0 answers