Skip to content

ReceivedDataPoint

A single data point within a ReceivedMetric.

$value is the gauge reading / sum total for gauge and sum metrics, or the histogram’s sum for histogram metrics — $count is only meaningful (non-null) for histograms, where $value / $count is the mean.

final class ReceivedDataPoint

SourceReceivedDataPoint.php
PropertyTypeDescription
$attributesarrayreadonly.
$count?``intreadonly.
$timeUnixNanointreadonly.
$valuefloatreadonly.

public function __construct(array<string, mixed> $attributes, float $value, ?int $count, int $timeUnixNano): mixed

ParameterTypeDescription
$attributesarray``<``string``, ``mixed``>
$valuefloat
$count?``int
$timeUnixNanoint

Returns mixed

MethodDescription
mean(): ?floatThe histogram’s mean, i.e.

public function mean(): ?float

The histogram’s mean, i.e.

$value / $count.

Null when $count is null (a gauge or sum data point, which has no mean) or zero (a histogram bucket that recorded nothing).

Returns ?``float