Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. NoopTracer.php

class NoopTracer

Hierarchy

  • class \OpenTelemetry\API\Trace\NoopTracer implements \OpenTelemetry\API\Trace\TracerInterface

Expanded class hierarchy of NoopTracer

2 files declare their use of NoopTracer
InstrumentationTrait.php in vendor/open-telemetry/api/Instrumentation/InstrumentationTrait.php
TracerProvider.php in vendor/open-telemetry/sdk/Trace/TracerProvider.php

File

vendor/open-telemetry/api/Trace/NoopTracer.php, line 9

Namespace

OpenTelemetry\API\Trace
View source
final class NoopTracer implements TracerInterface {
    private static ?self $instance = null;
    public static function getInstance() : self {
        if (null === self::$instance) {
            self::$instance = new self();
        }
        return self::$instance;
    }
    public function spanBuilder(string $spanName) : SpanBuilderInterface {
        return new NoopSpanBuilder(Context::storage());
    }
    public function isEnabled() : bool {
        return false;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
NoopTracer::$instance private static property
NoopTracer::getInstance public static function
NoopTracer::isEnabled public function Determine if the tracer is enabled. Instrumentation authors SHOULD call this method prior to
creating a new span.
@experimental
Overrides TracerInterface::isEnabled
NoopTracer::spanBuilder public function Overrides TracerInterface::spanBuilder
RSS feed
Powered by Drupal