Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Wait for Windows Diagnostics to wake up
static void WaitForWindowsAzureDiagnosticsInfrastructureToCatchUp()
// According to, the diagnostics infrastructure takes a
// few seconds to start. If a crash occurs during this time, we'd never be
// able to find out why.
// We also need to do this at the /end/ of the role. Even if we explicitly flush
// the trace, it'll still lose the last few messages if we exit too quickly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment