summaryrefslogtreecommitdiff
path: root/vendor/open-telemetry/sdk/Metrics/Data/Sum.php
blob: 77c4c1021fec8dc992d911e10c6e5d44780e5fce (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
<?php

declare(strict_types=1);

namespace OpenTelemetry\SDK\Metrics\Data;

final class Sum implements DataInterface
{

    /**
     * @var iterable<NumberDataPoint>
     * @readonly
     */
    public iterable $dataPoints;
    /**
     * @var string|Temporality
     * @readonly
     */
    public $temporality;
    /**
     * @readonly
     */
    public bool $monotonic;
    /**
     * @param iterable<NumberDataPoint> $dataPoints
     * @param string|Temporality $temporality
     */
    public function __construct(iterable $dataPoints, $temporality, bool $monotonic)
    {
        $this->dataPoints = $dataPoints;
        $this->temporality = $temporality;
        $this->monotonic = $monotonic;
    }
}