function ContextInterface::with
Returns a context with the given key set to the given value.
@template T
Parameters
ContextKeyInterface<T> $key key to set:
T|null $value value to set:
Return value
ContextInterface a context with the given key set to `$value`
See also
https://github.com/open-telemetry/opentelemetry-specification/blob/main…
1 method overrides ContextInterface::with()
- Context::with in vendor/
open-telemetry/ context/ Context.php - Returns a context with the given key set to the given value.
File
-
vendor/
open-telemetry/ context/ ContextInterface.php, line 64
Class
- ContextInterface
- Immutable execution scoped propagation mechanism.
Namespace
OpenTelemetry\ContextCode
public function with(ContextKeyInterface $key, $value) : ContextInterface;