summaryrefslogtreecommitdiff
path: root/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/SpanContext.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2023-10-20 17:12:29 +0300
committerAndrew Dolgov <[email protected]>2023-10-20 21:13:39 +0300
commitcdd7ad020e165fe680703b6d3319b908b682fb7a (patch)
treeb51eb09b7b4587e8fbc5624ac8d88d28cfcd0b04 /vendor/jonahgeorge/jaeger-client-php/src/Jaeger/SpanContext.php
parent45a9ff0c88cbd33892ff16ab837e9059937d656e (diff)
jaeger-client -> opentelemetry
Diffstat (limited to 'vendor/jonahgeorge/jaeger-client-php/src/Jaeger/SpanContext.php')
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/SpanContext.php120
1 files changed, 0 insertions, 120 deletions
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/SpanContext.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/SpanContext.php
deleted file mode 100644
index 447ffd1a5..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/SpanContext.php
+++ /dev/null
@@ -1,120 +0,0 @@
-<?php
-
-namespace Jaeger;
-
-use ArrayIterator;
-use OpenTracing\SpanContext as OTSpanContext;
-
-class SpanContext implements OTSpanContext
-{
- private $traceId;
-
- private $spanId;
-
- private $parentId;
-
- private $flags;
-
- /**
- * @var array
- */
- private $baggage;
-
- private $debugId;
-
- /**
- * SpanContext constructor.
- *
- * @param string $traceId
- * @param string $spanId
- * @param string $parentId
- * @param int|null $flags
- * @param array $baggage
- * @param int|null $debugId
- */
- public function __construct($traceId, $spanId, $parentId, $flags = null, $baggage = [], $debugId = null)
- {
- $this->traceId = $traceId;
- $this->spanId = $spanId;
- $this->parentId = $parentId;
- $this->flags = $flags;
- $this->baggage = is_array($baggage) ? $baggage : [];
- $this->debugId = $debugId;
- }
-
- /**
- * {@inheritdoc}
- * @return ArrayIterator
- */
- #[\ReturnTypeWillChange]
- public function getIterator()
- {
- return new ArrayIterator($this->baggage);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getBaggageItem(string $key): ?string
- {
- return array_key_exists($key, $this->baggage) ? $this->baggage[$key] : null;
- }
-
- /**
- * {@inheritdoc}
- *
- * @param string $key
- * @param string $value
- * @return SpanContext
- */
- public function withBaggageItem(string $key, string $value): OTSpanContext
- {
- return new self(
- $this->traceId,
- $this->spanId,
- $this->parentId,
- $this->flags,
- [$key => $value] + $this->baggage
- );
- }
-
- public function getTraceId()
- {
- return $this->traceId;
- }
-
- public function getParentId()
- {
- return $this->parentId;
- }
-
- public function getSpanId()
- {
- return $this->spanId;
- }
-
- /**
- * Get the span context flags.
- *
- * @return int|null
- */
- public function getFlags()
- {
- return $this->flags;
- }
-
- public function getBaggage()
- {
- return $this->baggage;
- }
-
- public function getDebugId()
- {
- return $this->debugId;
- }
-
- public function isDebugIdContainerOnly(): bool
- {
- return ($this->traceId === null) && ($this->debugId !== null);
- }
-}