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

Breadcrumb

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

function TracerProvider::getTracer

@inheritDoc

File

vendor/open-telemetry/sdk/Trace/TracerProvider.php, line 63

Class

TracerProvider

Namespace

OpenTelemetry\SDK\Trace

Code

public function getTracer(string $name, ?string $version = null, ?string $schemaUrl = null, iterable $attributes = []) : API\TracerInterface {
    if ($this->tracerSharedState
        ->hasShutdown()) {
        return NoopTracer::getInstance();
    }
    $scope = $this->instrumentationScopeFactory
        ->create($name, $version, $schemaUrl, $attributes);
    $tracer = new Tracer($this->tracerSharedState, $scope, $this->configurator);
    $this->tracers
        ->offsetSet($tracer, null);
    return $tracer;
}

API Navigation

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