From cdd7ad020e165fe680703b6d3319b908b682fb7a Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 20 Oct 2023 17:12:29 +0300 Subject: jaeger-client -> opentelemetry --- vendor/open-telemetry/context/ContextInterface.php | 86 ++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 vendor/open-telemetry/context/ContextInterface.php (limited to 'vendor/open-telemetry/context/ContextInterface.php') diff --git a/vendor/open-telemetry/context/ContextInterface.php b/vendor/open-telemetry/context/ContextInterface.php new file mode 100644 index 000000000..17a3fb9a2 --- /dev/null +++ b/vendor/open-telemetry/context/ContextInterface.php @@ -0,0 +1,86 @@ +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 $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 $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); +} -- cgit v1.2.3