summaryrefslogtreecommitdiff
path: root/vendor/open-telemetry/sdk/Metrics/MetricRegistry/MetricWriterInterface.php
blob: e5ff7eb5c309a52e78371961169a6556f418e2a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php

declare(strict_types=1);

namespace OpenTelemetry\SDK\Metrics\MetricRegistry;

use Closure;
use OpenTelemetry\SDK\Metrics\Instrument;

/**
 * @internal
 */
interface MetricWriterInterface
{
    public function record(Instrument $instrument, $value, iterable $attributes = [], $context = null): void;

    public function registerCallback(Closure $callback, Instrument $instrument, Instrument ...$instruments): int;

    public function unregisterCallback(int $callbackId): void;
}