OpenTelemetry PHP

TemporalityPreference
in package
implements AggregationTemporalitySelectorInterface

FinalYes

Chooses aggregation temporality by instrument kind, as for `OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE`.

Tags
see
https://opentelemetry.io/docs/specs/otel/metrics/sdk_exporters/otlp/#additional-environment-variable-configuration

Table of Contents

Interfaces

AggregationTemporalitySelectorInterface

Properties

$deltaInstrumentTypes  : array<string|int, mixed>

Methods

cumulative()  : self
delta()  : self
fromName()  : self
Accepts the environment variable values (`lowmemory`) and the declarative config ones (`low_memory`), in any case.
lowMemory()  : self
temporality()  : string|Temporality|null
Returns the temporality to use for the given metric.
__construct()  : mixed

Properties

Methods

fromName()

Accepts the environment variable values (`lowmemory`) and the declarative config ones (`low_memory`), in any case.

public static fromName(string $name) : self
Parameters
$name : string
Return values
self

temporality()

Returns the temporality to use for the given metric.

public temporality(MetricMetadataInterface $metric) : string|Temporality|null

It is recommended to return MetricMetadataInterface::temporality() if the exporter does not require a specific temporality.

Parameters
$metric : MetricMetadataInterface
Attributes
#[Override]
Return values
string|Temporality|null —

temporality to use, or null to signal that the given metric should not be exported by this exporter

On this page

Search results