MeterProvider
in package
implements
MeterProviderInterface
FinalYes
Table of Contents
Interfaces
Properties
- $clock : ClockInterface
- $closed : bool
- $configurator : Configurator|null
- $destructors : ArrayAccess
- $exemplarFilter : ExemplarFilterInterface|null
- $instrumentationScopeFactory : InstrumentationScopeFactoryInterface
- $instruments : MeterInstruments
- $meters : WeakMap
- $metricFactory : MetricFactoryInterface
- $metricReaders : iterable<string|int, mixed>
- $registry : MetricRegistryInterface
- $resource : ResourceInfo
- $stalenessHandlerFactory : StalenessHandlerFactoryInterface
- $viewRegistry : ViewRegistryInterface
- $writer : MetricWriterInterface
Methods
- __construct() : mixed
- builder() : MeterProviderBuilder
- forceFlush() : bool
- getMeter() : MeterInterface
- Returns a `Meter` for the given instrumentation scope.
- shutdown() : bool
- updateConfigurator() : void
- Update the {@link Configurator} for a {@link MeterProvider}, which will reconfigure all meters created from the provider.
Properties
$clock read-only
private
ClockInterface
$clock
$closed
private
bool
$closed
= false
$configurator
private
Configurator|null
$configurator
= null
$destructors read-only
private
ArrayAccess
$destructors
$exemplarFilter read-only
private
ExemplarFilterInterface|null
$exemplarFilter
$instrumentationScopeFactory read-only
private
InstrumentationScopeFactoryInterface
$instrumentationScopeFactory
$instruments read-only
private
MeterInstruments
$instruments
$meters read-only
private
WeakMap
$meters
$metricFactory read-only
private
MetricFactoryInterface
$metricFactory
= new StreamFactory()
$metricReaders read-only
private
iterable<string|int, mixed>
$metricReaders
$registry read-only
private
MetricRegistryInterface
$registry
$resource read-only
private
ResourceInfo
$resource
$stalenessHandlerFactory read-only
private
StalenessHandlerFactoryInterface
$stalenessHandlerFactory
$viewRegistry read-only
private
ViewRegistryInterface
$viewRegistry
$writer read-only
private
MetricWriterInterface
$writer
Methods
__construct()
public
__construct(ContextStorageInterface|null $contextStorage, ResourceInfo $resource, ClockInterface $clock, AttributesFactoryInterface $attributesFactory, InstrumentationScopeFactoryInterface $instrumentationScopeFactory, iterable<string|int, MetricReaderInterface|MetricSourceRegistryInterface|DefaultAggregationProviderInterface> $metricReaders, ViewRegistryInterface $viewRegistry, ExemplarFilterInterface|null $exemplarFilter, StalenessHandlerFactoryInterface $stalenessHandlerFactory[, MetricFactoryInterface $metricFactory = new StreamFactory() ][, Configurator|null $configurator = null ]) : mixed
Parameters
- $contextStorage : ContextStorageInterface|null
- $resource : ResourceInfo
- $clock : ClockInterface
- $attributesFactory : AttributesFactoryInterface
- $instrumentationScopeFactory : InstrumentationScopeFactoryInterface
- $metricReaders : iterable<string|int, MetricReaderInterface|MetricSourceRegistryInterface|DefaultAggregationProviderInterface>
- $viewRegistry : ViewRegistryInterface
- $exemplarFilter : ExemplarFilterInterface|null
- $stalenessHandlerFactory : StalenessHandlerFactoryInterface
- $metricFactory : MetricFactoryInterface = new StreamFactory()
- $configurator : Configurator|null = null
builder()
public
static builder() : MeterProviderBuilder
Return values
MeterProviderBuilderforceFlush()
public
forceFlush() : bool
Return values
boolgetMeter()
Returns a `Meter` for the given instrumentation scope.
public
getMeter(string $name[, string|null $version = null ][, string|null $schemaUrl = null ][, iterable<string|int, mixed> $attributes = [] ]) : MeterInterface
Parameters
- $name : string
-
name of the instrumentation scope
- $version : string|null = null
-
version of the instrumentation scope
- $schemaUrl : string|null = null
-
schema url to record in the emitted telemetry
- $attributes : iterable<string|int, mixed> = []
-
instrumentation scope attributes
Return values
MeterInterface —meter instance for the instrumentation scope
shutdown()
public
shutdown() : bool
Return values
boolupdateConfigurator()
Update the {@link Configurator} for a {@link MeterProvider}, which will reconfigure all meters created from the provider.
public
updateConfigurator(Configurator $configurator) : void
Parameters
- $configurator : Configurator