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

Breadcrumb

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

function Tracer::spanBuilder

@inheritDoc

File

vendor/open-telemetry/sdk/Trace/Tracer.php, line 28

Class

Tracer

Namespace

OpenTelemetry\SDK\Trace

Code

public function spanBuilder(string $spanName) : API\SpanBuilderInterface {
    if (ctype_space($spanName)) {
        $spanName = self::FALLBACK_SPAN_NAME;
    }
    // If a Tracer is disabled, it MUST behave equivalently to No-op Tracer
    if (!$this->config
        ->isEnabled() || $this->tracerSharedState
        ->hasShutdown()) {
        return new API\NoopSpanBuilder(Context::storage());
    }
    return new SpanBuilder($spanName, $this->instrumentationScope, $this->tracerSharedState);
}

API Navigation

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