File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 11// Copyright (c) Microsoft Corporation.
22// Licensed under the MIT License.
33
4+ using System . Diagnostics ;
45using System . Text ;
56using Google . Protobuf . WellKnownTypes ;
67using Microsoft . DurableTask . Client . Entities ;
@@ -85,6 +86,24 @@ public override async Task<string> ScheduleNewOrchestrationInstanceAsync(
8586 Input = this . DataConverter . Serialize ( input ) ,
8687 } ;
8788
89+ if ( Activity . Current ? . Id != null || Activity . Current ? . TraceStateString != null )
90+ {
91+ if ( request . ParentTraceContext == null )
92+ {
93+ request . ParentTraceContext = new P . TraceContext ( ) ;
94+ }
95+
96+ if ( Activity . Current ? . Id != null )
97+ {
98+ request . ParentTraceContext . TraceParent = Activity . Current ? . Id ;
99+ }
100+
101+ if ( Activity . Current ? . TraceStateString != null )
102+ {
103+ request . ParentTraceContext . TraceState = Activity . Current ? . TraceStateString ;
104+ }
105+ }
106+
88107 DateTimeOffset ? startAt = options ? . StartAt ;
89108 this . logger . SchedulingOrchestration (
90109 request . InstanceId ,
You can’t perform that action at this time.
0 commit comments