TracerProvider
in package
implements
TracerProviderInterface
FinalYes
Table of Contents
Interfaces
Properties
- $configurator : Configurator|null
- $instrumentationScopeFactory : InstrumentationScopeFactoryInterface
- $tracers : WeakMap
- $tracerSharedState : TracerSharedState
Methods
- __construct() : mixed
- builder() : TracerProviderBuilder
- forceFlush() : bool
- getSampler() : SamplerInterface
- getTracer() : TracerInterface
- shutdown() : bool
- Returns `false` is the provider is already shutdown, otherwise `true`.
- updateConfigurator() : void
- Update the {@link Configurator} for a {@link TracerProvider}, which will reconfigure all tracers created from the provider.
Properties
$configurator
private
Configurator|null
$configurator
= null
$instrumentationScopeFactory read-only
private
InstrumentationScopeFactoryInterface
$instrumentationScopeFactory
$tracers read-only
private
WeakMap
$tracers
$tracerSharedState read-only
private
TracerSharedState
$tracerSharedState
Methods
__construct()
public
__construct([array<int, SpanProcessorInterface>|SpanProcessorInterface|null $spanProcessors = [] ][, SamplerInterface|null $sampler = null ][, ResourceInfo|null $resource = null ][, SpanLimits|null $spanLimits = null ][, IdGeneratorInterface|null $idGenerator = null ][, InstrumentationScopeFactoryInterface|null $instrumentationScopeFactory = null ][, Configurator|null $configurator = null ]) : mixed
Parameters
- $spanProcessors : array<int, SpanProcessorInterface>|SpanProcessorInterface|null = []
- $sampler : SamplerInterface|null = null
- $resource : ResourceInfo|null = null
- $spanLimits : SpanLimits|null = null
- $idGenerator : IdGeneratorInterface|null = null
- $instrumentationScopeFactory : InstrumentationScopeFactoryInterface|null = null
- $configurator : Configurator|null = null
builder()
public
static builder() : TracerProviderBuilder
Return values
TracerProviderBuilderforceFlush()
public
forceFlush([CancellationInterface|null $cancellation = null ]) : bool
Parameters
- $cancellation : CancellationInterface|null = null
Return values
boolgetSampler()
public
getSampler() : SamplerInterface
Return values
SamplerInterfacegetTracer()
public
getTracer(string $name[, string|null $version = null ][, string|null $schemaUrl = null ][, iterable<string|int, mixed> $attributes = [] ]) : TracerInterface
Parameters
- $name : string
- $version : string|null = null
- $schemaUrl : string|null = null
- $attributes : iterable<string|int, mixed> = []
Tags
Return values
TracerInterfaceshutdown()
Returns `false` is the provider is already shutdown, otherwise `true`.
public
shutdown([CancellationInterface|null $cancellation = null ]) : bool
Parameters
- $cancellation : CancellationInterface|null = null
Return values
boolupdateConfigurator()
Update the {@link Configurator} for a {@link TracerProvider}, which will reconfigure all tracers created from the provider.
public
updateConfigurator(Configurator $configurator) : void
Parameters
- $configurator : Configurator