forked from DataDog/dd-trace-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathddtrace_php_api.stubs.php
More file actions
2343 lines (2342 loc) · 68.5 KB
/
ddtrace_php_api.stubs.php
File metadata and controls
2343 lines (2342 loc) · 68.5 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
namespace OpenTelemetry\Context {
/**
* @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md#context
*/
final class Context implements \OpenTelemetry\Context\ContextInterface
{
public static function createKey(string $key): \OpenTelemetry\Context\ContextKeyInterface
{
}
/**
* @param ContextStorageInterface&ExecutionContextAwareInterface $storage
*/
public static function setStorage(\OpenTelemetry\Context\ContextStorageInterface $storage): void
{
}
/**
* @return ContextStorageInterface&ExecutionContextAwareInterface
*/
public static function storage(): \OpenTelemetry\Context\ContextStorageInterface
{
}
/**
* @param ContextInterface|false|null $context
*
* @internal OpenTelemetry
*/
public static function resolve($context, ?\OpenTelemetry\Context\ContextStorageInterface $contextStorage = null): \OpenTelemetry\Context\ContextInterface
{
}
/**
* @internal
*/
public static function getRoot(): \OpenTelemetry\Context\ContextInterface
{
}
public static function getCurrent(): \OpenTelemetry\Context\ContextInterface
{
}
public function activate(): \OpenTelemetry\Context\ScopeInterface
{
}
public function withContextValue(\OpenTelemetry\Context\ImplicitContextKeyedInterface $value): \OpenTelemetry\Context\ContextInterface
{
}
public function with(\OpenTelemetry\Context\ContextKeyInterface $key, $value): self
{
}
public function get(\OpenTelemetry\Context\ContextKeyInterface $key)
{
}
}
}
namespace DDTrace\OpenTelemetry {
// Operation Name Conventions
class Convention
{
public static function defaultOperationName(\DDTrace\SpanData $span): string
{
}
}
}
namespace OpenTelemetry\SDK\Trace {
final class Span extends \OpenTelemetry\API\Trace\Span implements \OpenTelemetry\SDK\Trace\ReadWriteSpanInterface
{
/**
* This method _MUST_ not be used directly.
* End users should use a {@see API\TracerInterface} in order to create spans.
*
* @param non-empty-string $name
* @psalm-param API\SpanKind::KIND_* $kind
* @param list<LinkInterface> $links
*
* @internal
* @psalm-internal OpenTelemetry
*/
public static function startSpan(\DDTrace\SpanData $span, \OpenTelemetry\API\Trace\SpanContextInterface $context, \OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface $instrumentationScope, int $kind, \OpenTelemetry\API\Trace\SpanInterface $parentSpan, \OpenTelemetry\Context\ContextInterface $parentContext, \OpenTelemetry\SDK\Trace\SpanProcessorInterface $spanProcessor, \OpenTelemetry\SDK\Resource\ResourceInfo $resource, array $attributes, array $links, int $totalRecordedLinks, array $events, bool $isRemapped = true): self
{
}
public function getName(): string
{
}
/**
* @inheritDoc
*/
public function getContext(): \OpenTelemetry\API\Trace\SpanContextInterface
{
}
public function getParentContext(): \OpenTelemetry\API\Trace\SpanContextInterface
{
}
public function getInstrumentationScope(): \OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface
{
}
public function hasEnded(): bool
{
}
/**
* @inheritDoc
*/
public function toSpanData(): \OpenTelemetry\SDK\Trace\SpanDataInterface
{
}
/**
* @inheritDoc
*/
public function getDuration(): int
{
}
/**
* @inheritDoc
*/
public function getKind(): int
{
}
/**
* @inheritDoc
*/
public function getAttribute(string $key)
{
}
public function getStartEpochNanos(): int
{
}
public function getTotalRecordedLinks(): int
{
}
public function getTotalRecordedEvents(): int
{
}
/**
* @inheritDoc
*/
public function isRecording(): bool
{
}
/**
* @inheritDoc
*/
public function setAttribute(string $key, $value): \OpenTelemetry\API\Trace\SpanInterface
{
}
/**
* @inheritDoc
*/
public function setAttributes(iterable $attributes): \OpenTelemetry\API\Trace\SpanInterface
{
}
/**
* @inheritDoc
*/
public function addLink(\OpenTelemetry\API\Trace\SpanContextInterface $context, iterable $attributes = []): \OpenTelemetry\API\Trace\SpanInterface
{
}
/**
* @inheritDoc
*/
public function addEvent(string $name, iterable $attributes = [], $timestamp = null): \OpenTelemetry\API\Trace\SpanInterface
{
}
/**
* @inheritDoc
*/
public function recordException(\Throwable $exception, iterable $attributes = []): \OpenTelemetry\API\Trace\SpanInterface
{
}
/**
* @inheritDoc
*/
public function updateName(string $name): \OpenTelemetry\API\Trace\SpanInterface
{
}
/**
* @inheritDoc
*/
public function setStatus(string $code, ?string $description = null): \OpenTelemetry\API\Trace\SpanInterface
{
}
/**
* @inheritDoc
*/
public function end(?int $endEpochNanos = null): void
{
}
public function endOTelSpan(?int $endEpochNanos = null): void
{
}
public function getResource(): \OpenTelemetry\SDK\Resource\ResourceInfo
{
}
/**
* @internal
* @return SpanData
*/
public function getDDSpan(): \DDTrace\SpanData
{
}
}
final class SpanBuilder implements \OpenTelemetry\API\Trace\SpanBuilderInterface
{
/** @param non-empty-string $spanName */
public function __construct(string $spanName, \OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface $instrumentationScope, \OpenTelemetry\SDK\Trace\TracerSharedState $tracerSharedState)
{
}
/**
* @inheritDoc
*/
public function setParent($context): \OpenTelemetry\API\Trace\SpanBuilderInterface
{
}
public function addLink(\OpenTelemetry\API\Trace\SpanContextInterface $context, iterable $attributes = []): \OpenTelemetry\API\Trace\SpanBuilderInterface
{
}
public function addEvent(string $name, iterable $attributes = [], ?int $timestamp = null): \OpenTelemetry\API\Trace\SpanBuilderInterface
{
}
public function recordException(\Throwable $exception, iterable $attributes = []): \OpenTelemetry\API\Trace\SpanBuilderInterface
{
}
/** @inheritDoc */
public function setAttribute(string $key, $value): \OpenTelemetry\API\Trace\SpanBuilderInterface
{
}
/** @inheritDoc */
public function setAttributes(iterable $attributes): \OpenTelemetry\API\Trace\SpanBuilderInterface
{
}
/**
* @inheritDoc
*/
public function setStartTimestamp(int $timestampNanos): \OpenTelemetry\API\Trace\SpanBuilderInterface
{
}
/**
* @inheritDoc
*/
public function setSpanKind(int $spanKind): \OpenTelemetry\API\Trace\SpanBuilderInterface
{
}
/**
* @inheritDoc
*/
public function startSpan(): \OpenTelemetry\API\Trace\SpanInterface
{
}
}
}
namespace DDTrace\OpenTelemetry\API\Trace {
final class SpanContext implements \OpenTelemetry\API\Trace\SpanContextInterface
{
/**
* @inheritDoc
*/
public function getTraceId(): string
{
}
public function getTraceIdBinary(): string
{
}
/**
* @inheritDoc
*/
public function getSpanId(): string
{
}
public function getSpanIdBinary(): string
{
}
public function getTraceState(): ?\OpenTelemetry\API\Trace\TraceStateInterface
{
}
public function isSampled(): bool
{
}
public function isValid(): bool
{
}
public function isRemote(): bool
{
}
public function getTraceFlags(): int
{
}
/** @inheritDoc */
public static function createFromRemoteParent(string $traceId, string $spanId, int $traceFlags = \OpenTelemetry\API\Trace\TraceFlags::DEFAULT, ?\OpenTelemetry\API\Trace\TraceStateInterface $traceState = null): \OpenTelemetry\API\Trace\SpanContextInterface
{
}
/** @inheritDoc */
public static function create(string $traceId, string $spanId, int $traceFlags = \OpenTelemetry\API\Trace\TraceFlags::DEFAULT, ?\OpenTelemetry\API\Trace\TraceStateInterface $traceState = null): \OpenTelemetry\API\Trace\SpanContextInterface
{
}
/** @inheritDoc */
public static function getInvalid(): \OpenTelemetry\API\Trace\SpanContextInterface
{
}
public static function createFromLocalSpan(\DDTrace\SpanData $span, bool $sampled, ?string $traceId = null, ?string $spanId = null)
{
}
}
}
namespace DDTrace\Processing {
/**
* A span processor in charge of adding the trace analytics client config metric when appropriate.
*
* NOTE: this may be transformer into a filter for consistency with other tracers, but for now we did not implement
* any filtering functionality so giving it such name as of now might be misleading.
*/
final class TraceAnalyticsProcessor
{
/**
* @param array $metrics
* @param bool|float $value
*/
public static function normalizeAnalyticsValue(&$metrics, $value)
{
}
}
}
namespace DDTrace {
/**
* Propagator implementations should be able to inject and extract
* SpanContexts into an implementation specific carrier.
*/
interface Propagator
{
const DEFAULT_BAGGAGE_HEADER_PREFIX = 'ot-baggage-';
const DEFAULT_TRACE_ID_HEADER = 'x-datadog-trace-id';
const DEFAULT_PARENT_ID_HEADER = 'x-datadog-parent-id';
const DEFAULT_SAMPLING_PRIORITY_HEADER = 'x-datadog-sampling-priority';
const DEFAULT_ORIGIN_HEADER = 'x-datadog-origin';
/**
* Inject takes the SpanContext and injects it into the carrier using
* an implementation specific method.
*
* @param SpanContextInterface $spanContext
* @param array|\ArrayAccess $carrier
* @return void
*/
public function inject(\DDTrace\Contracts\SpanContext $spanContext, &$carrier);
/**
* Extract returns the SpanContext from the given carrier using an
* implementation specific method.
*
* @param array|\ArrayAccess $carrier
* @return SpanContextInterface
*/
public function extract($carrier);
}
}
namespace DDTrace\Log {
trait LoggingTrait
{
/**
* Emits a log message at debug level.
*
* @param string $message
* @param array $context
*/
protected static function logDebug($message, array $context = [])
{
}
/**
* Emits a log message at warning level.
*
* @param string $message
* @param array $context
*/
protected static function logWarning($message, array $context = [])
{
}
/**
* Emits a log message at error level.
*
* @param string $message
* @param array $context
*/
protected static function logError($message, array $context = [])
{
}
/**
* @return bool
*/
protected static function isLogDebugActive()
{
}
}
}
namespace DDTrace\Propagators {
final class TextMap implements \DDTrace\Propagator
{
use \DDTrace\Log\LoggingTrait;
/**
* @param Tracer $tracer
*/
public function __construct(\DDTrace\Contracts\Tracer $tracer)
{
}
/**
* {@inheritdoc}
*/
public function inject(\DDTrace\Contracts\SpanContext $spanContext, &$carrier)
{
}
/**
* {@inheritdoc}
*/
public function extract($carrier)
{
}
}
}
namespace DDTrace\Contracts {
/**
* Ported from opentracing/opentracing
* @see https://github.com/opentracing/opentracing-php/blob/master/src/OpenTracing/Scope.php
*/
/**
* A {@link Scope} formalizes the activation and deactivation of a {@link Span}, usually from a CPU standpoint.
*
* Many times a {@link Span} will be extant (in that {@link Span#finish()} has not been called) despite being in a
* non-runnable state from a CPU/scheduler standpoint. For instance, a {@link Span} representing the client side of an
* RPC will be unfinished but blocked on IO while the RPC is still outstanding. A {@link Scope} defines when a given
* {@link Span} <em>is</em> scheduled and on the path.
*/
interface Scope
{
/**
* Mark the end of the active period for the current thread and {@link Scope},
* updating the {@link ScopeManager#active()} in the process.
*
* NOTE: Calling {@link #close} more than once on a single {@link Scope} instance leads to undefined
* behavior.
*/
public function close();
/**
* @return Span the {@link Span} that's been scoped by this {@link Scope}
*/
public function getSpan();
}
}
namespace DDTrace {
final class Scope implements \DDTrace\Contracts\Scope
{
public function __construct(\DDTrace\ScopeManager $scopeManager, \DDTrace\Contracts\Span $span, $finishSpanOnClose)
{
}
/**
* {@inheritdoc}
*/
public function close()
{
}
/**
* {@inheritdoc}
*
* @return SpanInterface
*/
public function getSpan()
{
}
}
}
namespace DDTrace\Contracts {
/**
* Ported from opentracing/opentracing
* @see https://github.com/opentracing/opentracing-php/blob/master/src/OpenTracing/ScopeManager.php
*/
/**
* Keeps track of the current active `Span`.
*/
interface ScopeManager
{
const DEFAULT_FINISH_SPAN_ON_CLOSE = true;
/**
* Activates an `Span`, so that it is used as a parent when creating new spans.
* The implementation must keep track of the active spans sequence, so
* that previous spans can be resumed after a deactivation.
*
* @param Span $span the {@link Span} that should become the {@link #active()}
* @param bool $finishSpanOnClose whether span should automatically be finished
* when {@link Scope#close()} is called. Its default value is true.
*
* @return Scope instance to control the end of the active period for the {@link Span}. It is a
* programming error to neglect to call {@link Scope#close()} on the returned instance.
*/
public function activate(\DDTrace\Contracts\Span $span, $finishSpanOnClose = self::DEFAULT_FINISH_SPAN_ON_CLOSE);
/**
* Return the currently active {@link Scope} which can be used to access the
* currently active {@link Scope#getSpan()}.
*
* If there is an {@link Scope non-null scope}, its wrapped {@link Span} becomes an implicit parent
* (as {@link References#CHILD_OF} reference) of any
* newly-created {@link Span} at {@link Tracer.SpanBuilder#startActive(boolean)} or {@link SpanBuilder#start()}
* time rather than at {@link Tracer#buildSpan(String)} time.
*
* @return Scope|null
*/
public function getActive();
/**
* Closes all the current request root spans. Typically there only will be one.
*/
public function close();
}
}
namespace DDTrace {
final class ScopeManager implements \DDTrace\Contracts\ScopeManager
{
public function __construct($rootContext = null)
{
}
/**
* {@inheritdoc}
* @param Span|SpanInterface $span
*/
public function activate(\DDTrace\Contracts\Span $span, $finishSpanOnClose = self::DEFAULT_FINISH_SPAN_ON_CLOSE)
{
}
/**
* {@inheritdoc}
*/
public function getActive()
{
}
public function deactivate(\DDTrace\Scope $scope)
{
}
/** @internal */
public function getPrimaryRoot()
{
}
/** @internal */
public function getTopScope()
{
}
/**
* Closes all the current request root spans. Typically there only will be one.
*/
public function close()
{
}
}
}
namespace DDTrace\Contracts {
/**
* Ported from opentracing/opentracing
* @see https://github.com/opentracing/opentracing-php/blob/master/src/OpenTracing/Span.php
*/
interface Span
{
/**
* @return string
*/
public function getOperationName();
/**
* Yields the SpanContext for this Span. Note that the return value of
* Span::getContext() is still valid after a call to Span::finish(), as is
* a call to Span::getContext() after a call to Span::finish().
*
* @return SpanContext
*/
public function getContext();
/**
* Sets the end timestamp and finalizes Span state.
*
* With the exception of calls to getContext() (which are always allowed),
* finish() must be the last call made to any span instance, and to do
* otherwise leads to undefined behavior but not returning an exception.
*
* As an implementor, make sure you call {@see Tracer::deactivate()}
* otherwise new spans might try to be child of this one.
*
* If the span is already finished, a warning should be logged.
*
* @param float|int|\DateTimeInterface|null $finishTime if passing float or int
* it should represent the timestamp (including as many decimal places as you need)
* @return void
*/
public function finish($finishTime = null);
/**
* If the span is already finished, a warning should be logged.
*
* @param string $newOperationName
*/
public function overwriteOperationName($newOperationName);
/**
* Sets the span's resource name.
*
* @param string $resource
*/
public function setResource($resource);
/**
* Adds a tag to the span.
*
* If there is a pre-existing tag set for key, it is overwritten.
*
* As an implementor, consider using "standard tags" listed in {@see \DDTrace\Tags}
*
* If the span is already finished, a warning should be logged.
*
* @param string $key
* @param mixed $value
* @param boolean $setIfFinished
* @return void
*/
public function setTag($key, $value, $setIfFinished = false);
/**
* @param string $key
* @return string|null
*/
public function getTag($key);
/**
* Adds a log record to the span in key => value format, key must be a string and tag must be either
* a string, a boolean value, or a numeric type.
*
* If the span is already finished, a warning should be logged.
*
* @param array $fields
* @param int|float|\DateTimeInterface $timestamp
* @return void
*/
public function log(array $fields = [], $timestamp = null);
/**
* Adds a baggage item to the SpanContext which is immutable so it is required to use
* SpanContext::withBaggageItem to get a new one.
*
* If the span is already finished, a warning should be logged.
*
* @param string $key
* @param string $value
* @return void
*/
public function addBaggageItem($key, $value);
/**
* @param string $key
* @return string|null returns null when there is not a item under the provided key
*/
public function getBaggageItem($key);
/**
* @return array
*/
public function getAllBaggageItems();
/**
* Stores a Throwable object within the span tags. The error status is
* updated and the error.Error() string is included with a default tag key.
* If the Span has been finished, it will not be modified by this method.
*
* @param \Throwable|\Exception|bool|null $error
* @throws \InvalidArgumentException
*/
public function setError($error);
/**
* Stores an error message and type in the Span.
*
* @param string $message
* @param string $type
*/
public function setRawError($message, $type);
/**
* Tells whether or not this Span contains errors.
*
* @return bool
*/
public function hasError();
/**
* @return int
*/
public function getStartTime();
/**
* @return int
*/
public function getDuration();
/**
* @return string
*/
public function getTraceId();
/**
* @return string
*/
public function getSpanId();
/**
* @return null|string
*/
public function getParentId();
/**
* @return string
*/
public function getResource();
/**
* @return string
*/
public function getService();
/**
* @return string|null
*/
public function getType();
/**
* @return bool
*/
public function isFinished();
/**
* @return array
*/
public function getAllTags();
/**
* Tells whether or not the span has the provided tag. Note that there are no guarantees that the tag value is
* not empty.
*
* @param string $name
* @return bool
*/
public function hasTag($name);
/**
* Set a DD metric.
*
* @param string $key
* @param mixed $value
*/
public function setMetric($key, $value);
/**
* @return array All the currently set metrics.
*/
public function getMetrics();
}
}
namespace DDTrace\Data {
/**
* Class Span
* @property string $operationName
* @property string $resource
* @property string $service
* @property string $type
* @property int $startTime
* @property int $duration
* @property array $tags
* @property array $metrics
* @property array $baggage
*/
abstract class Span implements \DDTrace\Contracts\Span
{
/**
* @var SpanContextData
*/
public $context;
/**
* @var bool
*/
public $hasError = false;
/**
* @var \DDTrace\SpanData
*/
protected $internalSpan;
public function &__get($name)
{
}
public function __set($name, $value)
{
}
public function __isset($name)
{
}
}
}
namespace DDTrace {
class Span extends \DDTrace\Data\Span
{
use \DDTrace\Log\LoggingTrait;
public $internalSpan;
/**
* Span constructor.
* @param SpanData $internalSpan
* @param SpanContext $context
*/
public function __construct(\DDTrace\SpanData $internalSpan, \DDTrace\SpanContext $context)
{
}
/**
* {@inheritdoc}
*/
public function getTraceId()
{
}
/**
* {@inheritdoc}
*/
public function getSpanId()
{
}
/**
* {@inheritdoc}
*/
public function getParentId()
{
}
/**
* {@inheritdoc}
*/
public function overwriteOperationName($operationName)
{
}
/**
* {@inheritdoc}
*/
public function getResource()
{
}
/**
* {@inheritdoc}
*/
public function getService()
{
}
/**
* {@inheritdoc}
*/
public function getType()
{
}
/**
* {@inheritdoc}
*/
public function getStartTime()
{
}
/**
* {@inheritdoc}
*/
public function getDuration()
{
}
/**
* {@inheritdoc}
*/
public function setTag($key, $value, $setIfFinished = false)
{
}
/**
* {@inheritdoc}
*/
public function getTag($key)
{
}
/**
* {@inheritdoc}
*/
public function getAllTags()
{
}
/**
* {@inheritdoc}
*/
public function hasTag($name)
{
}
/**
* @param string $key
* @param mixed $value
*/
public function setMetric($key, $value)
{
}
/**
* @return array
*/
public function getMetrics()
{
}
/**
* {@inheritdoc}
*/
public function setResource($resource)
{
}
/**
* Stores a Throwable object within the span tags. The error status is
* updated and the error.Error() string is included with a default tag key.
* If the Span has been finished, it will not be modified by this method.
*
* @param Throwable|Exception|bool|null $error
* @throws InvalidArgumentException
*/
public function setError($error)
{
}
/**
* @param string $message
* @param string $type
*/
public function setRawError($message, $type)
{
}
public function hasError()
{
}
/**
* {@inheritdoc}
*/
public function finish($finishTime = null)
{
}
/**
* {@inheritdoc}
*/
public function isFinished()
{
}
/**
* {@inheritdoc}
*/
public function getOperationName()
{
}
/**
* {@inheritdoc}
*/
public function getContext()
{
}
/**
* {@inheritdoc}
*/
public function log(array $fields = [], $timestamp = null)
{
}
/**
* {@inheritdoc}
*/
public function addBaggageItem($key, $value)
{
}
/**
* {@inheritdoc}
*/
public function getBaggageItem($key)
{
}
/**
* {@inheritdoc}
*/
public function getAllBaggageItems()
{
}
/**
* {@inheritdoc}
*/
public function removeBaggageItem($key)
{
}
/**
* {@inheritdoc}
*/
public function removeAllBaggageItems()
{
}
public function __destruct()
{
}
}
}
namespace DDTrace\Contracts {
/**
* SpanContext must be immutable in order to avoid complicated lifetime
* issues around Span finish and references.
*
* Baggage items are key => value string pairs that apply to the given Span,
* its SpanContext, and all Spans which directly or transitively reference
* the local Span. That is, baggage items propagate in-band along with the
* trace itself.
*/
interface SpanContext extends \IteratorAggregate
{
/**
* Returns the value of a baggage item based on its key. If there is no
* value with such key it will return null.
*
* @param string $key
* @return string|null
*/
public function getBaggageItem($key);
/**
* Creates a new SpanContext out of the existing one and the new key => value pair.
*
* @param string $key
* @param string $value
* @return SpanContext
*/
public function withBaggageItem($key, $value);
/**
* @return array
*/
public function getAllBaggageItems();
/**
* Gets initial priority sampling, upon span creation
*
* @return int
*/
public function getPropagatedPrioritySampling();
/**
* Sets initial priority sampling, to be consumed upon span creation
*