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

Breadcrumb

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

class NoopSpanProcessor

Hierarchy

  • class \OpenTelemetry\SDK\Trace\SpanProcessor\NoopSpanProcessor implements \OpenTelemetry\SDK\Trace\SpanProcessorInterface

Expanded class hierarchy of NoopSpanProcessor

2 files declare their use of NoopSpanProcessor
SpanProcessorFactory.php in vendor/open-telemetry/sdk/Trace/SpanProcessorFactory.php
TracerSharedState.php in vendor/open-telemetry/sdk/Trace/TracerSharedState.php

File

vendor/open-telemetry/sdk/Trace/SpanProcessor/NoopSpanProcessor.php, line 13

Namespace

OpenTelemetry\SDK\Trace\SpanProcessor
View source
class NoopSpanProcessor implements SpanProcessorInterface {
    private static ?SpanProcessorInterface $instance = null;
    public static function getInstance() : SpanProcessorInterface {
        if (null === self::$instance) {
            self::$instance = new self();
        }
        return self::$instance;
    }
    
    /** @inheritDoc */
    public function onStart(ReadWriteSpanInterface $span, ContextInterface $parentContext) : void {
    }
    
    //@codeCoverageIgnore
    
    /** @inheritDoc */
    public function onEnd(ReadableSpanInterface $span) : void {
    }
    
    //@codeCoverageIgnore
    
    /** @inheritDoc */
    public function forceFlush(?CancellationInterface $cancellation = null) : bool {
        return true;
    }
    
    /** @inheritDoc */
    public function shutdown(?CancellationInterface $cancellation = null) : bool {
        return $this->forceFlush();
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
NoopSpanProcessor::$instance private static property
NoopSpanProcessor::forceFlush public function @inheritDoc Overrides SpanProcessorInterface::forceFlush
NoopSpanProcessor::getInstance public static function
NoopSpanProcessor::onEnd public function @inheritDoc Overrides SpanProcessorInterface::onEnd
NoopSpanProcessor::onStart public function @inheritDoc Overrides SpanProcessorInterface::onStart
NoopSpanProcessor::shutdown public function @inheritDoc Overrides SpanProcessorInterface::shutdown

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal