summaryrefslogtreecommitdiff
path: root/vendor/open-telemetry/sdk/Metrics/MetricSourceInterface.php
blob: 5f00a0717276cb95ab0cc1b8965d3765b598f104 (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
<?php

declare(strict_types=1);

namespace OpenTelemetry\SDK\Metrics;

use OpenTelemetry\SDK\Metrics\Data\Metric;

interface MetricSourceInterface
{
    /**
     * Returns the last metric collection timestamp.
     *
     * @return int last collection timestamp
     */
    public function collectionTimestamp(): int;

    /**
     * Collects metric data from the underlying provider.
     *
     * @return Metric collected metric
     */
    public function collect(): Metric;
}