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
Namespace
OpenTelemetry\SDK\Metrics\DataCode
public static function groupByIndex(iterable $exemplars) : array {
$grouped = [];
foreach ($exemplars as $exemplar) {
$grouped[$exemplar->index][] = $exemplar;
}
return $grouped;
}