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

declare(strict_types=1);

namespace OpenTelemetry\API\Metrics;

use OpenTelemetry\Context\ContextInterface;

interface CounterInterface
{

    /**
     * @param float|int $amount non-negative amount to increment by
     * @param iterable<non-empty-string, string|bool|float|int|array|null> $attributes
     *        attributes of the data point
     * @param ContextInterface|false|null $context execution context
     *
     * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#add
     */
    public function add($amount, iterable $attributes = [], $context = null): void;
}