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/opentracing/opentracing/src/OpenTracing/GlobalTracer.php | |
parent | 45a9ff0c88cbd33892ff16ab837e9059937d656e (diff) |
jaeger-client -> opentelemetry
Diffstat (limited to 'vendor/opentracing/opentracing/src/OpenTracing/GlobalTracer.php')
-rw-r--r-- | vendor/opentracing/opentracing/src/OpenTracing/GlobalTracer.php | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/vendor/opentracing/opentracing/src/OpenTracing/GlobalTracer.php b/vendor/opentracing/opentracing/src/OpenTracing/GlobalTracer.php deleted file mode 100644 index aafdba121..000000000 --- a/vendor/opentracing/opentracing/src/OpenTracing/GlobalTracer.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace OpenTracing; - -final class GlobalTracer -{ - /** - * @var Tracer - */ - private static $instance; - - /** - * @var bool - */ - private static $isRegistered = false; - - /** - * GlobalTracer::set sets the [singleton] Tracer returned by get(). - * Those who use GlobalTracer (rather than directly manage a Tracer instance) - * should call GlobalTracer::set as early as possible in bootstrap, prior to - * start a new span. Prior to calling GlobalTracer::set, any Spans started - * via the `Tracer::startActiveSpan` (etc) globals are noops. - * - * @param Tracer $tracer - * @return void - */ - public static function set(Tracer $tracer): void - { - self::$instance = $tracer; - self::$isRegistered = true; - } - - /** - * GlobalTracer::get returns the global singleton `Tracer` implementation. - * Before `GlobalTracer::set` is called, the `GlobalTracer::get` is a noop - * implementation that drops all data handed to it. - * - * @return Tracer - */ - public static function get(): Tracer - { - if (self::$instance === null) { - self::$instance = new NoopTracer(); - } - - return self::$instance; - } - - /** - * Returns true if a global tracer has been registered, otherwise returns false. - * - * @return bool - */ - public static function isRegistered(): bool - { - return self::$isRegistered; - } -} |