function LateBindingTracerProvider::getTracer
Overrides TracerProviderInterface::getTracer
File
-
vendor/
open-telemetry/ api/ Trace/ LateBindingTracerProvider.php, line 25
Class
- LateBindingTracerProvider
- Late binding providers are designed to be used by Instrumentation, while we do not have control over when all components (propagators, etc) which are registered through composer.autoload.files are actually loaded. It means that tracers etc are not…
Namespace
OpenTelemetry\API\TraceCode
public function getTracer(string $name, ?string $version = null, ?string $schemaUrl = null, iterable $attributes = []) : TracerInterface {
return $this->tracerProvider?->getTracer($name, $version, $schemaUrl, $attributes) ?? new LateBindingTracer(fn(): TracerInterface => ($this->tracerProvider ??= ($this->factory)())
->getTracer($name, $version, $schemaUrl, $attributes));
}