protected void Application_BeginRequest(object sender, EventArgs e)
        {
            beginRequest.WaitOne();

            try
            {
                if (!initalized)
                {
                    Configuration.SetAzureTraceListener();
                    var counterSpecifiers = PerformanceCounters.CounterSpecifiers(typeof(Counters)).Concat(PerformanceCounters.CounterSpecifiers(typeof(MessageCounters)));
                    Trace.TraceError("Initializing Azure Diagnostics");
                    Configuration.InitializeAzureDiagnostics(counterSpecifiers);
                    initalized = true;
                }
            }
            catch (Exception)
            {
                var location = Global.stateMachines.First().Value.Paxos.Self;
                Trace.TraceError("Error in Application_BeginRequest at " + location);
                Thread.Sleep(180000);
            }
            finally
            {
                beginRequest.ReleaseMutex();
            }
        }