Skip to content

Commit ea4bf80

Browse files
committed
Fix parent id check, sampling cannot be tested here
1 parent 5d0fc77 commit ea4bf80

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

tests/ext/distributed_tracing/propagation_behavior_extract_ignore.phpt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ $root = DDTrace\root_span();
1919

2020
// fresh trace: not from upstream
2121
echo "same_as_upstream: " . ($root->traceId === "0000000000000000000000000000002a" ? "yes" : "no") . "\n";
22-
echo "parent_id: " . $root->parentId . "\n";
22+
echo "parent_id: " . ($root->parentId ?? 0) . "\n";
2323

2424
// no span link (context discarded entirely)
2525
echo "links_count: " . count($root->links) . "\n";
@@ -28,15 +28,10 @@ echo "links_count: " . count($root->links) . "\n";
2828
$headers = DDTrace\generate_distributed_tracing_headers(['baggage']);
2929
echo "baggage: " . ($headers['baggage'] ?? 'none') . "\n";
3030

31-
// upstream sampling priority not carried over
32-
$dd_headers = DDTrace\generate_distributed_tracing_headers(['datadog']);
33-
echo "sampling_priority: " . ($dd_headers['x-datadog-sampling-priority'] ?? 'none') . "\n";
34-
3531
DDTrace\close_span();
3632
?>
3733
--EXPECT--
3834
same_as_upstream: no
3935
parent_id: 0
4036
links_count: 0
4137
baggage: none
42-
sampling_priority: none

0 commit comments

Comments
 (0)