private void RunShutdownTasks() { try { _agentWriter.FlushAndCloseAsync().Wait(); } catch (Exception ex) { Log.Error(ex, "Error flushing traces on shutdown."); } }
private void RunShutdownTasks() { try { _agentWriter.FlushAndCloseAsync().Wait(); } catch (Exception ex) { Log.SafeLogError(ex, "Error flushing traces on shutdown."); } try { TracingProcessManager.StopProcesses(); } catch (Exception ex) { Log.SafeLogError(ex, "Error stopping sub processes on shutdown."); } }
internal async Task FlushAsync() { await _agentWriter.FlushAndCloseAsync(); }
private void CurrentDomain_ProcessExit(object sender, EventArgs e) { _agentWriter.FlushAndCloseAsync().Wait(); }