summaryrefslogtreecommitdiff
path: root/vendor/open-telemetry/sdk/Metrics/Stream/Metric.php
blob: 6b1db9eeffb64813c76e6ea1a7f57fc319a27c9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php

declare(strict_types=1);

namespace OpenTelemetry\SDK\Metrics\Stream;

use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
use OpenTelemetry\SDK\Metrics\Data\Exemplar;

/**
 * @internal
 *
 * @template T
 */
final class Metric
{

    /**
     * @var array<AttributesInterface>
     */
    public array $attributes;
    /**
     * @var array<T>
     */
    public array $summaries;
    public int $timestamp;
    /**
     * @var array<Exemplar>
     */
    public array $exemplars;

    /**
     * @param array<AttributesInterface> $attributes
     * @param array<T> $summaries
     * @param array<Exemplar> $exemplars
     */
    public function __construct(array $attributes, array $summaries, int $timestamp, array $exemplars = [])
    {
        $this->attributes = $attributes;
        $this->summaries = $summaries;
        $this->timestamp = $timestamp;
        $this->exemplars = $exemplars;
    }
}