-
Notifications
You must be signed in to change notification settings - Fork 182
Expand file tree
/
Copy pathdistributed_trace_asm_standalone_01.phpt
More file actions
112 lines (108 loc) · 2.33 KB
/
Copy pathdistributed_trace_asm_standalone_01.phpt
File metadata and controls
112 lines (108 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
--TEST--
Sampling priority is changed to user keep if no asm upstream and asm standalone enabled. Also apm disabled tag is added
--ENV--
DD_TRACE_AUTO_FLUSH_ENABLED=0
HTTP_X_DATADOG_TRACE_ID=42
HTTP_X_DATADOG_PARENT_ID=10
HTTP_X_DATADOG_ORIGIN=datadog
HTTP_X_DATADOG_SAMPLING_PRIORITY=3
HTTP_X_DATADOG_TAGS=_dd.p.custom_tag=inherited,_dd.p.dropped,_dd.p.other_tag=also,_dd.p.drop
DD_TRACE_GENERATE_ROOT_SPAN=0
DD_APM_TRACING_ENABLED=0
DD_CODE_ORIGIN_FOR_SPANS_ENABLED=0
--FILE--
<?php
include __DIR__ . '/../sandbox/dd_dumper.inc';
$outer = DDTrace\start_span();
$outer->name = 'outer';
$inner = DDTrace\start_span();
$inner->name = 'inner';
DDTrace\close_span();
DDTrace\close_span();
var_dump(dd_clean_spans());
?>
--EXPECTF--
array(2) {
[0]=>
array(11) {
["trace_id"]=>
string(2) "42"
["span_id"]=>
string(%d) "%d"
["parent_id"]=>
string(2) "10"
["start"]=>
int(%d)
["duration"]=>
int(%d)
["name"]=>
string(5) "outer"
["resource"]=>
string(5) "outer"
["service"]=>
string(39) "distributed_trace_asm_standalone_01.php"
["type"]=>
string(3) "cli"
["meta"]=>
array(6) {
["_dd.origin"]=>
string(7) "datadog"
["_dd.p.custom_tag"]=>
string(9) "inherited"
["_dd.p.dm"]=>
string(2) "-0"
["_dd.p.other_tag"]=>
string(4) "also"
["_dd.propagation_error"]=>
string(14) "decoding_error"
["runtime-id"]=>
string(36) "%s"
}
["metrics"]=>
array(6) {
["_dd.apm.enabled"]=>
float(0)
["_sampling_priority_v1"]=>
float(1)
["php.compilation.total_time_ms"]=>
float(%f)
["php.memory.peak_real_usage_bytes"]=>
float(%f)
["php.memory.peak_usage_bytes"]=>
float(%f)
["process_id"]=>
float(%f)
}
}
[1]=>
array(11) {
["trace_id"]=>
string(2) "42"
["span_id"]=>
string(%d) "%d"
["parent_id"]=>
string(%d) "%d"
["start"]=>
int(%d)
["duration"]=>
int(%d)
["name"]=>
string(5) "inner"
["resource"]=>
string(5) "inner"
["service"]=>
string(39) "distributed_trace_asm_standalone_01.php"
["type"]=>
string(3) "cli"
["meta"]=>
array(1) {
["_dd.origin"]=>
string(7) "datadog"
}
["metrics"]=>
array(1) {
["_dd.apm.enabled"]=>
float(0)
}
}
}