From cdd7ad020e165fe680703b6d3319b908b682fb7a Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 20 Oct 2023 17:12:29 +0300 Subject: jaeger-client -> opentelemetry --- .../context/FiberBoundContextStorageScope.php | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 vendor/open-telemetry/context/FiberBoundContextStorageScope.php (limited to 'vendor/open-telemetry/context/FiberBoundContextStorageScope.php') diff --git a/vendor/open-telemetry/context/FiberBoundContextStorageScope.php b/vendor/open-telemetry/context/FiberBoundContextStorageScope.php new file mode 100644 index 000000000..647552244 --- /dev/null +++ b/vendor/open-telemetry/context/FiberBoundContextStorageScope.php @@ -0,0 +1,67 @@ +scope = $scope; + } + + public function offsetExists($offset): bool + { + return $this->scope->offsetExists($offset); + } + + /** + * @phan-suppress PhanUndeclaredClassAttribute + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->scope->offsetGet($offset); + } + + public function offsetSet($offset, $value): void + { + $this->scope->offsetSet($offset, $value); + } + + public function offsetUnset($offset): void + { + $this->scope->offsetUnset($offset); + } + + public function context(): ContextInterface + { + return $this->scope->context(); + } + + public function detach(): int + { + $flags = $this->scope->detach(); + assert(class_exists(Fiber::class, false)); + if ($this->scope[Fiber::class] !== Fiber::getCurrent()) { + $flags |= ScopeInterface::INACTIVE; + } + + return $flags; + } +} -- cgit v1.2.3-54-g00ecf