diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2024-10-01 16:00:34 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2024-10-01 16:00:34 +0300 |
| commit | 884fd92f1320d17daebb772297da03fb2cfa59b8 (patch) | |
| tree | 3aa80af1df6ffa1d70f21f9fc4411f451c8b6c56 /vendor/open-telemetry/api/Metrics | |
| parent | 8fcc68baf5b0ff964a0a4a045353462586e0e316 (diff) | |
drop opentelemetry
Diffstat (limited to 'vendor/open-telemetry/api/Metrics')
19 files changed, 0 insertions, 517 deletions
diff --git a/vendor/open-telemetry/api/Metrics/CounterInterface.php b/vendor/open-telemetry/api/Metrics/CounterInterface.php deleted file mode 100644 index f0da706e1..000000000 --- a/vendor/open-telemetry/api/Metrics/CounterInterface.php +++ /dev/null @@ -1,21 +0,0 @@ -<?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; -} diff --git a/vendor/open-telemetry/api/Metrics/HistogramInterface.php b/vendor/open-telemetry/api/Metrics/HistogramInterface.php deleted file mode 100644 index 22ddd1f3c..000000000 --- a/vendor/open-telemetry/api/Metrics/HistogramInterface.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace OpenTelemetry\API\Metrics; - -use OpenTelemetry\Context\ContextInterface; - -interface HistogramInterface -{ - - /** - * @param float|int $amount non-negative amount to record - * @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#record - */ - public function record($amount, iterable $attributes = [], $context = null): void; -} diff --git a/vendor/open-telemetry/api/Metrics/MeterInterface.php b/vendor/open-telemetry/api/Metrics/MeterInterface.php deleted file mode 100644 index 6e06d9085..000000000 --- a/vendor/open-telemetry/api/Metrics/MeterInterface.php +++ /dev/null @@ -1,111 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace OpenTelemetry\API\Metrics; - -interface MeterInterface -{ - - /** - * Creates a `Counter`. - * - * @param string $name name of the instrument - * @param string|null $unit unit of measure - * @param string|null $description description of the instrument - * @return CounterInterface created instrument - * - * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#counter-creation - */ - public function createCounter( - string $name, - ?string $unit = null, - ?string $description = null - ): CounterInterface; - - /** - * Creates an `ObservableCounter`. - * - * @param string $name name of the instrument - * @param string|null $unit unit of measure - * @param string|null $description description of the instrument - * @param callable ...$callbacks responsible for reporting measurements - * @return ObservableCounterInterface created instrument - * - * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#asynchronous-counter-creation - */ - public function createObservableCounter( - string $name, - ?string $unit = null, - ?string $description = null, - callable ...$callbacks - ): ObservableCounterInterface; - - /** - * Creates a `Histogram`. - * - * @param string $name name of the instrument - * @param string|null $unit unit of measure - * @param string|null $description description of the instrument - * @return HistogramInterface created instrument - * - * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#histogram-creation - */ - public function createHistogram( - string $name, - ?string $unit = null, - ?string $description = null - ): HistogramInterface; - - /** - * Creates an `ObservableGauge`. - * - * @param string $name name of the instrument - * @param string|null $unit unit of measure - * @param string|null $description description of the instrument - * @param callable ...$callbacks responsible for reporting measurements - * @return ObservableGaugeInterface created instrument - * - * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#asynchronous-gauge-creation - */ - public function createObservableGauge( - string $name, - ?string $unit = null, - ?string $description = null, - callable ...$callbacks - ): ObservableGaugeInterface; - - /** - * Creates an `UpDownCounter`. - * - * @param string $name name of the instrument - * @param string|null $unit unit of measure - * @param string|null $description description of the instrument - * @return UpDownCounterInterface created instrument - * - * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#updowncounter-creation - */ - public function createUpDownCounter( - string $name, - ?string $unit = null, - ?string $description = null - ): UpDownCounterInterface; - - /** - * Creates an `ObservableUpDownCounter`. - * - * @param string $name name of the instrument - * @param string|null $unit unit of measure - * @param string|null $description description of the instrument - * @param callable ...$callbacks responsible for reporting measurements - * @return ObservableUpDownCounterInterface created instrument - * - * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#asynchronous-updowncounter-creation - */ - public function createObservableUpDownCounter( - string $name, - ?string $unit = null, - ?string $description = null, - callable ...$callbacks - ): ObservableUpDownCounterInterface; -} diff --git a/vendor/open-telemetry/api/Metrics/MeterProviderInterface.php b/vendor/open-telemetry/api/Metrics/MeterProviderInterface.php deleted file mode 100644 index f8fa07a2e..000000000 --- a/vendor/open-telemetry/api/Metrics/MeterProviderInterface.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace OpenTelemetry\API\Metrics; - -interface MeterProviderInterface -{ - - /** - * Returns a `Meter` for the given instrumentation scope. - * - * @param string $name name of the instrumentation scope - * @param string|null $version version of the instrumentation scope - * @param string|null $schemaUrl schema url to record in the emitted telemetry - * @param iterable<non-empty-string, string|bool|float|int|array|null> $attributes - * instrumentation scope attributes - * @return MeterInterface meter instance for the instrumentation scope - * - * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#get-a-meter - */ - public function getMeter( - string $name, - ?string $version = null, - ?string $schemaUrl = null, - iterable $attributes = [] - ): MeterInterface; -} diff --git a/vendor/open-telemetry/api/Metrics/Noop/NoopCounter.php b/vendor/open-telemetry/api/Metrics/Noop/NoopCounter.php deleted file mode 100644 index d47fc2166..000000000 --- a/vendor/open-telemetry/api/Metrics/Noop/NoopCounter.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace OpenTelemetry\API\Metrics\Noop; - -use OpenTelemetry\API\Metrics\CounterInterface; - -/** - * @internal - */ -final class NoopCounter implements CounterInterface -{ - public function add($amount, iterable $attributes = [], $context = null): void - { - // no-op - } -} diff --git a/vendor/open-telemetry/api/Metrics/Noop/NoopHistogram.php b/vendor/open-telemetry/api/Metrics/Noop/NoopHistogram.php deleted file mode 100644 index 79f0e60ce..000000000 --- a/vendor/open-telemetry/api/Metrics/Noop/NoopHistogram.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace OpenTelemetry\API\Metrics\Noop; - -use OpenTelemetry\API\Metrics\HistogramInterface; - -/** - * @internal - */ -final class NoopHistogram implements HistogramInterface -{ - public function record($amount, iterable $attributes = [], $context = null): void - { - // no-op - } -} diff --git a/vendor/open-telemetry/api/Metrics/Noop/NoopMeter.php b/vendor/open-telemetry/api/Metrics/Noop/NoopMeter.php deleted file mode 100644 index 31e3bd35c..000000000 --- a/vendor/open-telemetry/api/Metrics/Noop/NoopMeter.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace OpenTelemetry\API\Metrics\Noop; - -use OpenTelemetry\API\Metrics\CounterInterface; -use OpenTelemetry\API\Metrics\HistogramInterface; -use OpenTelemetry\API\Metrics\MeterInterface; -use OpenTelemetry\API\Metrics\ObservableCounterInterface; -use OpenTelemetry\API\Metrics\ObservableGaugeInterface; -use OpenTelemetry\API\Metrics\ObservableUpDownCounterInterface; -use OpenTelemetry\API\Metrics\UpDownCounterInterface; - -final class NoopMeter implements MeterInterface -{ - public function createCounter(string $name, ?string $unit = null, ?string $description = null): CounterInterface - { - return new NoopCounter(); - } - - public function createObservableCounter(string $name, ?string $unit = null, ?string $description = null, callable ...$callbacks): ObservableCounterInterface - { - return new NoopObservableCounter(); - } - - public function createHistogram(string $name, ?string $unit = null, ?string $description = null): HistogramInterface - { - return new NoopHistogram(); - } - - public function createObservableGauge(string $name, ?string $unit = null, ?string $description = null, callable ...$callbacks): ObservableGaugeInterface - { - return new NoopObservableGauge(); - } - - public function createUpDownCounter(string $name, ?string $unit = null, ?string $description = null): UpDownCounterInterface - { - return new NoopUpDownCounter(); - } - - public function createObservableUpDownCounter(string $name, ?string $unit = null, ?string $description = null, callable ...$callbacks): ObservableUpDownCounterInterface - { - return new NoopObservableUpDownCounter(); - } -} diff --git a/vendor/open-telemetry/api/Metrics/Noop/NoopMeterProvider.php b/vendor/open-telemetry/api/Metrics/Noop/NoopMeterProvider.php deleted file mode 100644 index b4b5810eb..000000000 --- a/vendor/open-telemetry/api/Metrics/Noop/NoopMeterProvider.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace OpenTelemetry\API\Metrics\Noop; - -use OpenTelemetry\API\Metrics\MeterInterface; -use OpenTelemetry\API\Metrics\MeterProviderInterface; - -final class NoopMeterProvider implements MeterProviderInterface -{ - public function getMeter( - string $name, - ?string $version = null, - ?string $schemaUrl = null, - iterable $attributes = [] - ): MeterInterface { - return new NoopMeter(); - } -} diff --git a/vendor/open-telemetry/api/Metrics/Noop/NoopObservableCallback.php b/vendor/open-telemetry/api/Metrics/Noop/NoopObservableCallback.php deleted file mode 100644 index c933bd506..000000000 --- a/vendor/open-telemetry/api/Metrics/Noop/NoopObservableCallback.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace OpenTelemetry\API\Metrics\Noop; - -use OpenTelemetry\API\Metrics\ObservableCallbackInterface; - -/** - * @internal - */ -final class NoopObservableCallback implements ObservableCallbackInterface -{ - public function detach(): void - { - // no-op - } -} diff --git a/vendor/open-telemetry/api/Metrics/Noop/NoopObservableCounter.php b/vendor/open-telemetry/api/Metrics/Noop/NoopObservableCounter.php deleted file mode 100644 index 41e363201..000000000 --- a/vendor/open-telemetry/api/Metrics/Noop/NoopObservableCounter.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace OpenTelemetry\API\Metrics\Noop; - -use OpenTelemetry\API\Metrics\ObservableCallbackInterface; -use OpenTelemetry\API\Metrics\ObservableCounterInterface; - -/** - * @internal - */ -final class NoopObservableCounter implements ObservableCounterInterface -{ - public function observe(callable $callback, bool $weaken = false): ObservableCallbackInterface - { - return new NoopObservableCallback(); - } -} diff --git a/vendor/open-telemetry/api/Metrics/Noop/NoopObservableGauge.php b/vendor/open-telemetry/api/Metrics/Noop/NoopObservableGauge.php deleted file mode 100644 index 987a530c8..000000000 --- a/vendor/open-telemetry/api/Metrics/Noop/NoopObservableGauge.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace OpenTelemetry\API\Metrics\Noop; - -use OpenTelemetry\API\Metrics\ObservableCallbackInterface; -use OpenTelemetry\API\Metrics\ObservableGaugeInterface; - -/** - * @internal - */ -final class NoopObservableGauge implements ObservableGaugeInterface -{ - public function observe(callable $callback, bool $weaken = false): ObservableCallbackInterface - { - return new NoopObservableCallback(); - } -} diff --git a/vendor/open-telemetry/api/Metrics/Noop/NoopObservableUpDownCounter.php b/vendor/open-telemetry/api/Metrics/Noop/NoopObservableUpDownCounter.php deleted file mode 100644 index 65a2bb830..000000000 --- a/vendor/open-telemetry/api/Metrics/Noop/NoopObservableUpDownCounter.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace OpenTelemetry\API\Metrics\Noop; - -use OpenTelemetry\API\Metrics\ObservableCallbackInterface; -use OpenTelemetry\API\Metrics\ObservableUpDownCounterInterface; - -/** - * @internal - */ -final class NoopObservableUpDownCounter implements ObservableUpDownCounterInterface -{ - public function observe(callable $callback, bool $weaken = false): ObservableCallbackInterface - { - return new NoopObservableCallback(); - } -} diff --git a/vendor/open-telemetry/api/Metrics/Noop/NoopUpDownCounter.php b/vendor/open-telemetry/api/Metrics/Noop/NoopUpDownCounter.php deleted file mode 100644 index e26140b7c..000000000 --- a/vendor/open-telemetry/api/Metrics/Noop/NoopUpDownCounter.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace OpenTelemetry\API\Metrics\Noop; - -use OpenTelemetry\API\Metrics\UpDownCounterInterface; - -/** - * @internal - */ -final class NoopUpDownCounter implements UpDownCounterInterface -{ - public function add($amount, iterable $attributes = [], $context = null): void - { - // no-op - } -} diff --git a/vendor/open-telemetry/api/Metrics/ObservableCallbackInterface.php b/vendor/open-telemetry/api/Metrics/ObservableCallbackInterface.php deleted file mode 100644 index a20e59666..000000000 --- a/vendor/open-telemetry/api/Metrics/ObservableCallbackInterface.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace OpenTelemetry\API\Metrics; - -/** - * An observed callback. - * - * Callbacks that are bound to an object are automatically detached when the - * `ObservableCallbackInterface` and the bound object are out of scope. - * This means that the `ObservableCallbackInterface` can be ignored if the - * observed callback should be bound to the lifetime of the object. - * ```php - * class Example { - * function __construct(MeterProviderInterface $meterProvider) { - * $meterProvider->getMeter('example') - * ->createObservableGauge('random') - * ->observe(fn(ObserverInterface $observer) - * => $observer->observe(rand(0, 10))); - * } - * } - * ``` - * Keeping a reference to the `ObservableCallbackInterface` within the bound - * object to gain a more fine-grained control over the life-time of the callback - * does not prevent garbage collection (but might require cycle collection). - * - * Unbound (static) callbacks must be detached manually using - * {@link ObservableCallbackInterface::detach()}. - * ```php - * class Example { - * private ObservableCallbackInterface $gauge; - * function __construct(MeterProviderInterface $meterProvider) { - * $this->gauge = $meterProvider->getMeter('example') - * ->createObservableGauge('random') - * ->observe(static fn(ObserverInterface $observer) - * => $observer->observe(rand(0, 10))); - * } - * function __destruct() { - * $this->gauge->detach(); - * } - * } - * ``` - * - * @see ObservableCounterInterface::observe() - * @see ObservableGaugeInterface::observe() - * @see ObservableUpDownCounterInterface::observe() - */ -interface ObservableCallbackInterface -{ - - /** - * Detaches the associated callback from the instrument. - */ - public function detach(): void; -} diff --git a/vendor/open-telemetry/api/Metrics/ObservableCounterInterface.php b/vendor/open-telemetry/api/Metrics/ObservableCounterInterface.php deleted file mode 100644 index feb1ed439..000000000 --- a/vendor/open-telemetry/api/Metrics/ObservableCounterInterface.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace OpenTelemetry\API\Metrics; - -interface ObservableCounterInterface -{ - - /** - * @param callable(ObserverInterface): void $callback function responsible for - * reporting the measurements (as absolute values) - * @return ObservableCallbackInterface token to detach callback - */ - public function observe(callable $callback): ObservableCallbackInterface; -} diff --git a/vendor/open-telemetry/api/Metrics/ObservableGaugeInterface.php b/vendor/open-telemetry/api/Metrics/ObservableGaugeInterface.php deleted file mode 100644 index afe59a777..000000000 --- a/vendor/open-telemetry/api/Metrics/ObservableGaugeInterface.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace OpenTelemetry\API\Metrics; - -interface ObservableGaugeInterface -{ - - /** - * @param callable(ObserverInterface): void $callback function responsible for - * reporting the measurements - * @return ObservableCallbackInterface token to detach callback - */ - public function observe(callable $callback): ObservableCallbackInterface; -} diff --git a/vendor/open-telemetry/api/Metrics/ObservableUpDownCounterInterface.php b/vendor/open-telemetry/api/Metrics/ObservableUpDownCounterInterface.php deleted file mode 100644 index 79548dec6..000000000 --- a/vendor/open-telemetry/api/Metrics/ObservableUpDownCounterInterface.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace OpenTelemetry\API\Metrics; - -interface ObservableUpDownCounterInterface -{ - - /** - * @param callable(ObserverInterface): void $callback function responsible for - * reporting the measurements (as absolute values) - * @return ObservableCallbackInterface token to detach callback - */ - public function observe(callable $callback): ObservableCallbackInterface; -} diff --git a/vendor/open-telemetry/api/Metrics/ObserverInterface.php b/vendor/open-telemetry/api/Metrics/ObserverInterface.php deleted file mode 100644 index 36e0ea791..000000000 --- a/vendor/open-telemetry/api/Metrics/ObserverInterface.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace OpenTelemetry\API\Metrics; - -interface ObserverInterface -{ - - /** - * Records the given absolute datapoint. - * - * @param float|int $amount observed amount - * @param iterable<non-empty-string, string|bool|float|int|array|null> $attributes - * attributes of the data point - */ - public function observe($amount, iterable $attributes = []): void; -} diff --git a/vendor/open-telemetry/api/Metrics/UpDownCounterInterface.php b/vendor/open-telemetry/api/Metrics/UpDownCounterInterface.php deleted file mode 100644 index f1f808fdb..000000000 --- a/vendor/open-telemetry/api/Metrics/UpDownCounterInterface.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace OpenTelemetry\API\Metrics; - -use OpenTelemetry\Context\ContextInterface; - -interface UpDownCounterInterface -{ - - /** - * @param float|int $amount amount to increment / decrement 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 - */ - public function add($amount, iterable $attributes = [], $context = null): void; -} |