TemporalityPreference
in package
implements
AggregationTemporalitySelectorInterface
FinalYes
Chooses aggregation temporality by instrument kind, as for `OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE`.
Tags
Table of Contents
Interfaces
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
$deltaInstrumentTypes read-only
private
array<string|int, mixed>
$deltaInstrumentTypes
Methods
cumulative()
public
static cumulative() : self
Return values
selfdelta()
public
static delta() : self
Return values
selffromName()
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
selflowMemory()
public
static lowMemory() : self
Return values
selftemporality()
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
__construct()
private
__construct(array<int, string|InstrumentType> $deltaInstrumentTypes) : mixed
Parameters
- $deltaInstrumentTypes : array<int, string|InstrumentType>