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

Breadcrumb

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

function BucketStorage::collect

Parameters

array<AttributesInterface> $dataPointAttributes:

Return value

array<Exemplar>

File

vendor/open-telemetry/sdk/Metrics/Exemplar/BucketStorage.php, line 52

Class

BucketStorage
@internal

Namespace

OpenTelemetry\SDK\Metrics\Exemplar

Code

public function collect(array $dataPointAttributes) : array {
    $exemplars = [];
    foreach ($this->buckets as $index => &$exemplar) {
        if (!$exemplar) {
            continue;
        }
        $exemplars[$index] = new Exemplar($exemplar->index, $exemplar->value, $exemplar->timestamp, $this->filterExemplarAttributes($dataPointAttributes[$exemplar->index], $exemplar->attributes), $exemplar->traceId, $exemplar->spanId);
        $exemplar = null;
    }
    return $exemplars;
}
RSS feed
Powered by Drupal