OpenTelemetry PHP

InMemoryExporter
in package
implements MetricExporterInterface, AggregationTemporalitySelectorInterface, PushMetricExporterInterface

FinalYes
Tags
see
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk_exporters/in-memory.md

Table of Contents

Interfaces

MetricExporterInterface
AggregationTemporalitySelectorInterface
PushMetricExporterInterface

Properties

$closed  : bool
$storage  : ArrayObject
$temporality  : string|Temporality|AggregationTemporalitySelectorInterface|null

Methods

__construct()  : mixed
collect()  : array<string|int, Metric>
export()  : bool
forceFlush()  : bool
shutdown()  : bool
temporality()  : string|Temporality|null
Returns the temporality to use for the given metric.

Properties

Methods

__construct()

public __construct([ArrayObject $storage = new ArrayObject() ][, string|Temporality|AggregationTemporalitySelectorInterface|null $temporality = null ]) : mixed
Parameters
$storage : ArrayObject = new ArrayObject()
$temporality : string|Temporality|AggregationTemporalitySelectorInterface|null = null

a selector such as TemporalityPreference. Passing a Temporality or a string is deprecated. Null uses each stream's temporality until 2.0, and cumulative from 2.0.

Tags
template-implements

$storage

collect()

public collect([bool $reset = false ]) : array<string|int, Metric>
Parameters
$reset : bool = false
Return values
array<string|int, Metric>

export()

public export(iterable<string|int, mixed> $batch) : bool
Parameters
$batch : iterable<string|int, mixed>
Attributes
#[Override]
Return values
bool

forceFlush()

public forceFlush() : bool
Attributes
#[Override]
Return values
bool

shutdown()

public shutdown() : bool
Attributes
#[Override]
Return values
bool
On this page

Search results