1 | <?php |
||
11 | final class Transaction implements JsonSerializable |
||
12 | { |
||
13 | /** |
||
14 | * @var Context|null |
||
15 | */ |
||
16 | private $context; |
||
17 | |||
18 | /** |
||
19 | * @var float |
||
20 | */ |
||
21 | private $duration; |
||
22 | |||
23 | /** |
||
24 | * @var UuidInterface |
||
25 | */ |
||
26 | private $id; |
||
27 | |||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | private $name; |
||
32 | |||
33 | /** |
||
34 | * @var string|null |
||
35 | */ |
||
36 | private $result; |
||
37 | |||
38 | /** |
||
39 | * @var Timestamp |
||
40 | */ |
||
41 | private $timestamp; |
||
42 | |||
43 | /** |
||
44 | * @var Span[] |
||
45 | */ |
||
46 | private $spanList = []; |
||
47 | |||
48 | /** |
||
49 | * @var string |
||
50 | */ |
||
51 | private $type; |
||
52 | |||
53 | /** |
||
54 | * @var mixed[] |
||
55 | */ |
||
56 | private $markList = []; |
||
57 | |||
58 | /** |
||
59 | * @var bool|null |
||
60 | */ |
||
61 | private $isSampled; |
||
62 | |||
63 | /** |
||
64 | * @var int |
||
65 | */ |
||
66 | private $droppedTotalSpanCount; |
||
67 | |||
68 | 49 | public function __construct( |
|
81 | |||
82 | 35 | public function inContext(Context $context): self |
|
89 | |||
90 | 1 | public function resultingIn(string $result): self |
|
97 | |||
98 | 35 | public function withSpan(Span ...$span): self |
|
105 | |||
106 | 16 | public function marking(string $group, string $event, float $timestamp): self |
|
117 | |||
118 | 1 | public function thatIsSampled(): self |
|
125 | |||
126 | 1 | public function thatIsNotSampled(): self |
|
133 | |||
134 | 1 | public function withTotalDroppedSpans(int $count): self |
|
141 | |||
142 | /** |
||
143 | * @return mixed[] |
||
144 | */ |
||
145 | 44 | public function jsonSerialize(): array |
|
161 | } |
||
162 |