File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -86,14 +86,22 @@ public override async Task<string> ScheduleNewOrchestrationInstanceAsync(
8686 Input = this . DataConverter . Serialize ( input ) ,
8787 } ;
8888
89- if ( Activity . Current ? . Id != null )
89+ if ( Activity . Current ? . Id != null || Activity . Current ? . TraceStateString != null )
9090 {
91- request . ParentTraceContext . TraceParent = Activity . Current ? . Id ;
92- }
91+ if ( request . ParentTraceContext == null )
92+ {
93+ request . ParentTraceContext = new P . TraceContext ( ) ;
94+ }
9395
94- if ( Activity . Current ? . TraceStateString != null )
95- {
96- request . ParentTraceContext . TraceState = Activity . Current ? . TraceStateString ;
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+ }
97105 }
98106
99107 DateTimeOffset ? startAt = options ? . StartAt ;
You can’t perform that action at this time.
0 commit comments