Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@
(IInvokeHandlerContext context10) => InvokeHandlerTerminator.Invoke(context10)))))))))))

(IRecoverabilityContext context0) => CaptureRecoverabilityActionBehavior.Invoke(context0,
(IRecoverabilityContext context1) => ForceNewParentWhenNecessaryDuringRecoverabilityBehavior.Invoke(context1,
(IRecoverabilityContext context2) => RecoverabilityRoutingConnector.Invoke(context2,
(IRoutingContext context3) => ThrowIfCannotDeferMessageBehavior.Invoke(context3,
(IRoutingContext context4) => AttachSenderRelatedInfoOnMessageBehavior.Invoke(context4,
(IRoutingContext context5) => RoutingToDispatchConnector.Invoke(context5,
(IDispatchContext context6) => ImmediateDispatchTerminator.Invoke(context6)))))))
(IRecoverabilityContext context1) => RecoverabilityRoutingConnector.Invoke(context1,
(IRoutingContext context2) => ThrowIfCannotDeferMessageBehavior.Invoke(context2,
(IRoutingContext context3) => AttachSenderRelatedInfoOnMessageBehavior.Invoke(context3,
(IRoutingContext context4) => RoutingToDispatchConnector.Invoke(context4,
(IDispatchContext context5) => ImmediateDispatchTerminator.Invoke(context5))))))

This file was deleted.

5 changes: 0 additions & 5 deletions src/NServiceBus.Core/OpenTelemetry/OpenTelemetryFeature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,5 @@ protected override void Setup(FeatureConfigurationContext context)
new OpenTelemetrySendBehavior(),
"Manages the depth of the trace for sends"
);

context.Pipeline.Register(
new ForceNewParentWhenNecessaryDuringRecoverabilityBehavior(),
"Overrides the parent trace when necessary during recoverability to avoid creating a child trace of the delayed or failed message's trace"
);
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@ internal static int GetDelayedDeliveriesPerformed(this Dictionary<string, string

public static int GetDelayedDeliveriesPerformed(this IncomingMessage message) => message.Headers.GetDelayedDeliveriesPerformed();

public static void SetCurrentDelayedDeliveries(this OutgoingMessage message, int currentDelayedRetry) => message.Headers[Headers.DelayedRetries] = currentDelayedRetry.ToString();
public static void SetCurrentDelayedDeliveries(this OutgoingMessage message, int currentDelayedRetry)
{
message.Headers[Headers.DelayedRetries] = currentDelayedRetry.ToString();
if (message.Headers.ContainsKey(Headers.DiagnosticsTraceParent))
{
message.Headers[Headers.StartNewTrace] = bool.TrueString;
}
}

public static void SetDelayedDeliveryTimestamp(this OutgoingMessage message, DateTimeOffset timestamp) => message.Headers[Headers.DelayedRetriesTimestamp] = DateTimeOffsetHelper.ToWireFormattedString(timestamp);
}
5 changes: 5 additions & 0 deletions src/NServiceBus.Core/Recoverability/MoveToError.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ public override IReadOnlyCollection<IRoutingContext> GetRoutingContexts(IRecover
_ = outgoingMessageHeaders.Remove(Headers.ImmediateRetries);
var outgoingMessage = new OutgoingMessage(context.MessageId, outgoingMessageHeaders, context.Body);

if (context.Headers.ContainsKey(Headers.DiagnosticsTraceParent))
{
outgoingMessageHeaders[Headers.StartNewTrace] = bool.TrueString;
}

foreach (var faultMetadata in metadata)
{
outgoingMessageHeaders[faultMetadata.Key] = faultMetadata.Value;
Expand Down
Loading