diff options
author | Andrew Dolgov <[email protected]> | 2023-10-20 17:12:29 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2023-10-20 21:13:39 +0300 |
commit | cdd7ad020e165fe680703b6d3319b908b682fb7a (patch) | |
tree | b51eb09b7b4587e8fbc5624ac8d88d28cfcd0b04 /vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Scope.php | |
parent | 45a9ff0c88cbd33892ff16ab837e9059937d656e (diff) |
jaeger-client -> opentelemetry
Diffstat (limited to 'vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Scope.php')
-rw-r--r-- | vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Scope.php | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Scope.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Scope.php deleted file mode 100644 index 86511bae0..000000000 --- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Scope.php +++ /dev/null @@ -1,71 +0,0 @@ -<?php - -namespace Jaeger; - -use OpenTracing\Scope as OTScope; -use OpenTracing\Span as OTSpan; - -/** - * {@inheritdoc} - */ -class Scope implements OTScope -{ - /** - * @var ScopeManager - */ - private $scopeManager; - - /** - * @var OTSpan - */ - private $wrapped; - - /** - * @var OTScope|null - */ - private $toRestore; - - /** - * @var bool - */ - private $finishSpanOnClose; - - /** - * Scope constructor. - * @param ScopeManager $scopeManager - * @param OTSpan $wrapped - * @param bool $finishSpanOnClose - */ - public function __construct(ScopeManager $scopeManager, OTSpan $wrapped, bool $finishSpanOnClose) - { - $this->scopeManager = $scopeManager; - $this->wrapped = $wrapped; - $this->finishSpanOnClose = $finishSpanOnClose; - $this->toRestore = $scopeManager->getActive(); - } - - /** - * {@inheritdoc} - */ - public function close(): void - { - if ($this->scopeManager->getActive() !== $this) { - // This shouldn't happen if users call methods in expected order - return; - } - - if ($this->finishSpanOnClose) { - $this->wrapped->finish(); - } - - $this->scopeManager->setActive($this->toRestore); - } - - /** - * {@inheritdoc} - */ - public function getSpan(): OTSpan - { - return $this->wrapped; - } -} |