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/context/ContextInterface.php | |
| parent | 8fcc68baf5b0ff964a0a4a045353462586e0e316 (diff) | |
drop opentelemetry
Diffstat (limited to 'vendor/open-telemetry/context/ContextInterface.php')
| -rw-r--r-- | vendor/open-telemetry/context/ContextInterface.php | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/vendor/open-telemetry/context/ContextInterface.php b/vendor/open-telemetry/context/ContextInterface.php deleted file mode 100644 index 17a3fb9a2..000000000 --- a/vendor/open-telemetry/context/ContextInterface.php +++ /dev/null @@ -1,86 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace OpenTelemetry\Context; - -/** - * Immutable execution scoped propagation mechanism. - * - * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md#context - */ -interface ContextInterface -{ - /** - * Creates a new context key. - * - * @param non-empty-string $key name of the key - * @return ContextKeyInterface created key - * - * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md#create-a-key - */ - public static function createKey(string $key): ContextKeyInterface; - - /** - * Returns the current context. - * - * @return ContextInterface current context - * - * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md#get-current-context - */ - public static function getCurrent(): ContextInterface; - - /** - * Attaches this context as active context. - * - * The returned scope has to be {@link ScopeInterface::detach()}ed. In most - * cases this should be done using a `try-finally` statement: - * ```php - * $scope = $context->activate(); - * try { - * // ... - * } finally { - * $scope->detach(); - * } - * ``` - * - * @return ScopeInterface scope to detach the context and restore the previous - * context - * - * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md#attach-context - */ - public function activate(): ScopeInterface; - - /** - * Returns a context with the given key set to the given value. - * - * @template T - * @param ContextKeyInterface<T> $key key to set - * @param T|null $value value to set - * @return ContextInterface a context with the given key set to `$value` - * - * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md#set-value - */ - public function with(ContextKeyInterface $key, $value): ContextInterface; - - /** - * Returns a context with the given value set. - * - * @param ImplicitContextKeyedInterface $value value to set - * @return ContextInterface a context with the given `$value` - * - * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md#set-value - */ - public function withContextValue(ImplicitContextKeyedInterface $value): ContextInterface; - - /** - * Returns the value assigned to the given key. - * - * @template T - * @param ContextKeyInterface<T> $key key to get - * @return T|null value assigned to `$key`, or null if no such value exists - * - * @see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md#get-value - */ - public function get(ContextKeyInterface $key); -} |