Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. LastValueAggregation.php

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\Aggregation

Code

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;
    }
}
RSS feed
Powered by Drupal