public static void Enable() { // Report any exceptions which may have been caught before telemetry was enabled. ReportExceptionBuffer.EnableForwarding(); // we report this problem after the buffer is flushed // because the above call also opens future exceptions to be passed through // and in case telemetry is allowed later, we want all the exceptions we can get if (!Sink.IsEnabled) { Sink.ReportException(new Exception(Properties.Resources.LostExceptionTelemetry)); } }
/// <summary> /// Report an Exception into the pipeline /// </summary> /// <param name="e">The Exception to report</param> public static void ReportException(this Exception e) { if (e == null) { return; } if (!IsEnabled) { return; } Sink.ReportException(e); }
public void ReportException(Exception e) { _telemetrySink.ReportException(e); }