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

Breadcrumb

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

function HistogramBucketReservoir::offer

Overrides ExemplarReservoirInterface::offer

File

vendor/open-telemetry/sdk/Metrics/Exemplar/HistogramBucketReservoir.php, line 28

Class

HistogramBucketReservoir

Namespace

OpenTelemetry\SDK\Metrics\Exemplar

Code

public function offer($index, $value, AttributesInterface $attributes, ContextInterface $context, int $timestamp) : void {
    $boundariesCount = count($this->boundaries);
    for ($i = 0; $i < $boundariesCount && $this->boundaries[$i] < $value; $i++) {
    }
    $this->storage
        ->store($i, $index, $value, $attributes, $context, $timestamp);
}
RSS feed
Powered by Drupal