Skip to content

Commit ab77972

Browse files
committed
fix: performs correction for the convertB3ToW3C method
1 parent fb0b95e commit ab77972

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Opentelemetry.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@ public static function getOpentelemetryValues(): array
3939
carrier: $appendContext
4040
);
4141

42-
$traceparent = self::convertB3ToW3C($appendContext);
42+
if ($appendContext) {
43+
$traceparent = self::convertB3ToW3C($appendContext);
4344

44-
return ['traceparent' => $traceparent];
45+
return ['traceparent' => $traceparent];
46+
}
4547
}
4648

4749
return $appendContext;

0 commit comments

Comments
 (0)