From 8f3646a9c93a06f76f6abb31020fdb74b4b1fc59 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 9 Apr 2023 20:50:33 +0300 Subject: exp: jaeger tracing --- .../opentracing/src/OpenTracing/Mock/MockScope.php | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 vendor/opentracing/opentracing/src/OpenTracing/Mock/MockScope.php (limited to 'vendor/opentracing/opentracing/src/OpenTracing/Mock/MockScope.php') diff --git a/vendor/opentracing/opentracing/src/OpenTracing/Mock/MockScope.php b/vendor/opentracing/opentracing/src/OpenTracing/Mock/MockScope.php new file mode 100644 index 000000000..a814b45b5 --- /dev/null +++ b/vendor/opentracing/opentracing/src/OpenTracing/Mock/MockScope.php @@ -0,0 +1,62 @@ +scopeManager = $scopeManager; + $this->span = $span; + $this->finishSpanOnClose = $finishSpanOnClose; + } + + /** + * {@inheritdoc} + */ + public function close(): void + { + if ($this->finishSpanOnClose) { + $this->span->finish(); + } + + $this->scopeManager->deactivate($this); + } + + /** + * {@inheritdoc} + * @return Span|MockSpan + */ + public function getSpan(): Span + { + return $this->span; + } +} -- cgit v1.2.3