diff --git a/src/MassTransit/Courier/CompensateActivityHost.cs b/src/MassTransit/Courier/CompensateActivityHost.cs index 5f73b9e237b..ad80b4d06c9 100644 --- a/src/MassTransit/Courier/CompensateActivityHost.cs +++ b/src/MassTransit/Courier/CompensateActivityHost.cs @@ -42,9 +42,15 @@ public async Task Send(ConsumeContext context, IPipe.ShortName, exception).ConfigureAwait(false); + + activity?.AddExceptionEvent(exception); + + instrument?.AddException(exception); + + await compensateContext.Failed(exception).Evaluate().ConfigureAwait(false); } await context.NotifyConsumed(timer.Elapsed, TypeCache.ShortName).ConfigureAwait(false); diff --git a/src/MassTransit/Courier/ExecuteActivityHost.cs b/src/MassTransit/Courier/ExecuteActivityHost.cs index c94e9712abf..d33d55e1639 100644 --- a/src/MassTransit/Courier/ExecuteActivityHost.cs +++ b/src/MassTransit/Courier/ExecuteActivityHost.cs @@ -49,6 +49,11 @@ public async Task Send(ConsumeContext context, IPipe.ShortName, exception).ConfigureAwait(false); + + activity?.AddExceptionEvent(exception); + instrument?.AddException(exception); + await executeContext.Result.Evaluate().ConfigureAwait(false); }