We have a startup trace. Not sure if possible - we should see if there is a way to write a trace during stop. This will make it easier to correlate or understand the behavior.
I have support for shutdown actions in WebActivator, so we might be able to use this. See this for an example.
And obviously, it'll only work if it dies of natural causes :)
OK, I will do a quick test on Azure env for happy restart (change appsettings) and see if we can get the trace. For abrupt shutdown, we can't do much. Well at least, lacking of this trace could indicate abrupt shutdown.
Here is the sample trace. Uptime is how long since startup. LastRequestTime is how long since last request.
<step title="Process Shutdown" date="03/27 1:08:42" pid="1984,4,13" uptime="00:00:29.2636553" lastrequesttime="00:00:20.2329833" elapsed="0"/>