From 884fd92f1320d17daebb772297da03fb2cfa59b8 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 1 Oct 2024 16:00:34 +0300 Subject: drop opentelemetry --- vendor/open-telemetry/api/Baggage/Baggage.php | 100 -------------------------- 1 file changed, 100 deletions(-) delete mode 100644 vendor/open-telemetry/api/Baggage/Baggage.php (limited to 'vendor/open-telemetry/api/Baggage/Baggage.php') diff --git a/vendor/open-telemetry/api/Baggage/Baggage.php b/vendor/open-telemetry/api/Baggage/Baggage.php deleted file mode 100644 index 06c701605..000000000 --- a/vendor/open-telemetry/api/Baggage/Baggage.php +++ /dev/null @@ -1,100 +0,0 @@ -get(ContextKeys::baggage()) ?? self::getEmpty(); - } - - /** @inheritDoc */ - public static function getBuilder(): BaggageBuilderInterface - { - return new BaggageBuilder(); - } - - /** @inheritDoc */ - public static function getCurrent(): BaggageInterface - { - return self::fromContext(Context::getCurrent()); - } - - /** @inheritDoc */ - public static function getEmpty(): BaggageInterface - { - if (null === self::$emptyBaggage) { - self::$emptyBaggage = new self(); - } - - return self::$emptyBaggage; - } - - /** @var array */ - private array $entries; - - /** @param array $entries */ - public function __construct(array $entries = []) - { - $this->entries = $entries; - } - - /** @inheritDoc */ - public function activate(): ScopeInterface - { - return Context::getCurrent()->withContextValue($this)->activate(); - } - - /** @inheritDoc */ - public function getEntry(string $key): ?Entry - { - return $this->entries[$key] ?? null; - } - - /** @inheritDoc */ - public function getValue(string $key) - { - if (($entry = $this->getEntry($key)) !== null) { - return $entry->getValue(); - } - - return null; - } - - /** @inheritDoc */ - public function getAll(): iterable - { - foreach ($this->entries as $key => $entry) { - yield $key => $entry; - } - } - - /** @inheritDoc */ - public function isEmpty(): bool - { - return $this->entries === []; - } - - /** @inheritDoc */ - public function toBuilder(): BaggageBuilderInterface - { - return new BaggageBuilder($this->entries); - } - - /** @inheritDoc */ - public function storeInContext(ContextInterface $context): ContextInterface - { - return $context->with(ContextKeys::baggage(), $this); - } -} -- cgit v1.2.3-54-g00ecf