function LastValueAggregation::record
Parameters
LastValueSummary $summary:
Overrides AggregationInterface::record
File
-
vendor/
open-telemetry/ sdk/ Metrics/ Aggregation/ LastValueAggregation.php, line 25
Class
- LastValueAggregation
- @implements AggregationInterface<LastValueSummary>
Namespace
OpenTelemetry\SDK\Metrics\AggregationCode
public function record($summary, $value, AttributesInterface $attributes, ContextInterface $context, int $timestamp) : void {
if ($summary->value === null || $timestamp >= $summary->timestamp) {
$summary->value = $value;
$summary->timestamp = $timestamp;
}
}