From 15999ad03544b4edaba19d16856995e53d04c726 Mon Sep 17 00:00:00 2001 From: Varshi Bachu Date: Mon, 16 Dec 2024 23:45:04 -0800 Subject: [PATCH] updated condition to create StartOrchestrationOptions and set parent trace id --- src/Worker.Extensions.DurableTask/FunctionsDurableTaskClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Worker.Extensions.DurableTask/FunctionsDurableTaskClient.cs b/src/Worker.Extensions.DurableTask/FunctionsDurableTaskClient.cs index b5b5736a1..ebc4eb1a1 100644 --- a/src/Worker.Extensions.DurableTask/FunctionsDurableTaskClient.cs +++ b/src/Worker.Extensions.DurableTask/FunctionsDurableTaskClient.cs @@ -78,7 +78,7 @@ public override Task ScheduleNewOrchestrationInstanceAsync( CancellationToken cancellation = default) { Activity? currActivity = Activity.Current; - if (currActivity != null) + if (options == null && options?.ParentTraceId == null && currActivity != null) { options = new StartOrchestrationOptions(ParentTraceId: currActivity?.Id?.ToString()); }