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 (!TelemetrySink.IsEnabled) { TelemetrySink.ReportException(new Exception("Telemetry was lost! Exceptions were flushed from ReportExceptionBuffer, but the telemetry sink was not open.")); } }
/// <summary> /// Report an Exception into the pipeline /// </summary> /// <param name="e">The Exception to report</param> public static void ReportException(this Exception e) { if (!IsEnabled) { return; } if (e == null) { return; } TelemetrySink.ReportException(e); }
public void ReportException(Exception e) { TelemetrySink.ReportException(e); }