Class RuntimeContext
Defined in File runtime_context.h
Class Documentation
-
class opentelemetry::context::RuntimeContext
Public Static Functions
-
static inline Context SetValue(nostd::string_view key, const ContextValue &value, Context *context = nullptr) noexcept
-
static inline ContextValue GetValue(nostd::string_view key, Context *context = nullptr) noexcept
Provide a custom runtime context storage.
This provides a possibility to override the default thread-local runtime context storage. This has to be set before any spans are created by the application, otherwise the behavior is undefined.
- Parameters
storage – a custom runtime context storage
-
static inline Context SetValue(nostd::string_view key, const ContextValue &value, Context *context = nullptr) noexcept