OpenTelemetry PHP

MeterProvider
in package
implements MeterProviderInterface

FinalYes

Table of Contents

Interfaces

MeterProviderInterface

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

$instruments read-only

private MeterInstruments $instruments

$metricFactory read-only

private MetricFactoryInterface $metricFactory = new StreamFactory()

$metricReaders read-only

private iterable<string|int, mixed> $metricReaders

$registry read-only

private MetricRegistryInterface $registry

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

getMeter()

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

updateConfigurator()

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
Tags
experimental

        
On this page

Search results