summaryrefslogtreecommitdiff
path: root/vendor/open-telemetry/sdk/Metrics/ViewProjection.php
blob: 046bd6bb124e99b3b9932d4bde9754c3b5b327d2 (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
45
46
47
<?php

declare(strict_types=1);

namespace OpenTelemetry\SDK\Metrics;

final class ViewProjection
{
    /**
     * @readonly
     */
    public string $name;
    /**
     * @readonly
     */
    public ?string $unit;
    /**
     * @readonly
     */
    public ?string $description;
    /**
     * @readonly
     * @var list<string>|null
     */
    public ?array $attributeKeys;
    /**
     * @readonly
     */
    public ?AggregationInterface $aggregation;

    /**
     * @param list<string>|null $attributeKeys
     */
    public function __construct(
        string $name,
        ?string $unit,
        ?string $description,
        ?array $attributeKeys,
        ?AggregationInterface $aggregation
    ) {
        $this->name = $name;
        $this->unit = $unit;
        $this->description = $description;
        $this->attributeKeys = $attributeKeys;
        $this->aggregation = $aggregation;
    }
}