Skip to content

Commit 426f54e

Browse files
committed
trace flags update
1 parent a70bda5 commit 426f54e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/AzureFunctions.PowerShell.Durable.SDK.psm1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,12 @@ function Start-DurableOrchestration {
123123
$traceFlags = $activity.TraceFlags
124124
$traceState = $activity.TraceStateString
125125

126-
$traceparent = "00-$traceId-$spanId-01"
126+
$flag = "00"
127+
if ($null -ne $traceFlags -and $traceFlags -eq "Recorded") {
128+
$flag = "01"
129+
}
130+
131+
$traceparent = "00-$traceId-$spanId-$flag"
127132

128133
$headers = @{
129134
"traceparent" = $traceparent

0 commit comments

Comments
 (0)