opentelemetry.context package¶
Submodules¶
Module contents¶
-
opentelemetry.context.
get_value
(key, context=None)[source]¶ To access the local state of a concern, the RuntimeContext API provides a function which takes a context and a key as input, and returns a value.
-
opentelemetry.context.
set_value
(key, value, context=None)[source]¶ To record the local state of a cross-cutting concern, the RuntimeContext API provides a function which takes a context, a key, and a value as input, and returns an updated context which contains the new value.
-
opentelemetry.context.
remove_value
(key, context=None)[source]¶ To remove a value, this method returns a new context with the key cleared. Note that the removed value still remains present in the old context.
-
opentelemetry.context.
get_current
()[source]¶ To access the context associated with program execution, the RuntimeContext API provides a function which takes no arguments and returns a RuntimeContext.
- Return type