Flow PHP

MeterProvider

Read onlyYes
FinalYes

Methods

__construct()  : mixed
meter()  : Meter
Create a meter for the given instrumentation scope.

Methods

__construct()

public __construct(MetricProcessor $processor[, ClockInterface $clock = new SystemClock() ][, AggregationTemporality $temporality = AggregationTemporality::CUMULATIVE ][, ExemplarFilter $exemplarFilter = new TraceBasedExemplarFilter() ][, MetricLimits $limits = new MetricLimits() ][, ErrorHandler $errorHandler = new ErrorLogHandler() ]) : mixed
Parameters
$processor : MetricProcessor
$clock : ClockInterface = new SystemClock()
$temporality : AggregationTemporality = AggregationTemporality::CUMULATIVE
$exemplarFilter : ExemplarFilter = new TraceBasedExemplarFilter()
$limits : MetricLimits = new MetricLimits()
$errorHandler : ErrorHandler = new ErrorLogHandler()

meter()

Create a meter for the given instrumentation scope.

public meter(Resource $resource, string $name[, string $version = 'unknown' ][, null|string $schemaUrl = null ][, null|Attributes $attributes = null ][, null|Attributes $signalAttributes = null ]) : Meter

Note: Instance caching is handled by the Telemetry class. This method always creates a new Meter instance.

Parameters
$resource : Resource

The resource context for all metrics from this meter

$name : string

The name of the instrumentation scope (e.g., library name)

$version : string = 'unknown'

The version of the instrumentation scope

$schemaUrl : null|string = null

Schema URL for semantic conventions

$attributes : null|Attributes = null

Additional scope attributes

$signalAttributes : null|Attributes = null

Default attributes merged into every recorded metric data point (per-call values win)

Return values
Meter
On this page

Search results