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

Breadcrumb

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

function Exemplar::groupByIndex

Parameters

iterable<Exemplar> $exemplars:

Return value

array<list<Exemplar>>

2 calls to Exemplar::groupByIndex()
AsynchronousMetricStream::collect in vendor/open-telemetry/sdk/Metrics/Stream/AsynchronousMetricStream.php
Collects metric data for the given reader.
SynchronousMetricStream::collect in vendor/open-telemetry/sdk/Metrics/Stream/SynchronousMetricStream.php
Collects metric data for the given reader.

File

vendor/open-telemetry/sdk/Metrics/Data/Exemplar.php, line 25

Class

Exemplar

Namespace

OpenTelemetry\SDK\Metrics\Data

Code

public static function groupByIndex(iterable $exemplars) : array {
    $grouped = [];
    foreach ($exemplars as $exemplar) {
        $grouped[$exemplar->index][] = $exemplar;
    }
    return $grouped;
}
RSS feed
Powered by Drupal