private void HandleFail(Exception ex, TimeSpan duration, RabbitMqHandleParams prms) { if (RabbitMqLogger.IsEnabled(Constants.Events.ReceiveFail)) { RabbitMqLogger.Write(Constants.Events.ReceiveFail, RabbitMqFailEvent <RabbitMqHandleParams> .Fail(ex, duration, prms)); } }
private void HandleFail(RabbitMqFailEvent <RabbitMqHandleParams> evt) { try { if (!_processingQueries.TryRemove(evt.Params.Id, out var span)) { return; } span.Duration = evt.Duration.TotalMilliseconds; span.CaptureException(evt.Exception); span.End(); } catch { } }