Exemplar.php
Same filename in this branch
Namespace
OpenTelemetry\SDK\Metrics\DataFile
-
vendor/
open-telemetry/ sdk/ Metrics/ Data/ Exemplar.php
View source
<?php
declare (strict_types=1);
namespace OpenTelemetry\SDK\Metrics\Data;
use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
final class Exemplar {
public function __construct(int|string $index, float|int $value, int $timestamp, AttributesInterface $attributes, ?string $traceId, ?string $spanId) {
}
/**
* @param iterable<Exemplar> $exemplars
* @return array<list<Exemplar>>
*/
public static function groupByIndex(iterable $exemplars) : array {
$grouped = [];
foreach ($exemplars as $exemplar) {
$grouped[$exemplar->index][] = $exemplar;
}
return $grouped;
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
Exemplar |