|
Logger System 0.1.3
High-performance C++20 thread-safe logging system with asynchronous capabilities
|
Thread-local storage for OpenTelemetry context. More...
#include <otel_context.h>

Static Public Member Functions | |
| static void | set (const otel_context &ctx) |
| Set the OpenTelemetry context for the current thread. | |
| static std::optional< otel_context > | get () |
| Get the OpenTelemetry context for the current thread. | |
| static void | clear () |
| Clear the OpenTelemetry context for the current thread. | |
| static bool | has_context () |
| Check if a context is set for the current thread. | |
Static Private Member Functions | |
| static otel_context & | get_storage () |
| static bool & | get_has_context () |
Thread-local storage for OpenTelemetry context.
Provides thread-safe storage and retrieval of OpenTelemetry context using thread-local storage. This allows automatic context propagation within a thread.
Definition at line 215 of file otel_context.h.
|
inlinestatic |
Clear the OpenTelemetry context for the current thread.
Definition at line 242 of file otel_context.h.
References get_has_context(), and get_storage().
Referenced by kcenon::logger::otlp::otel_context_scope::~otel_context_scope().


|
inlinestaticnodiscard |
Get the OpenTelemetry context for the current thread.
Definition at line 232 of file otel_context.h.
References get_has_context(), and get_storage().
Referenced by kcenon::logger::otlp_writer::write().


|
inlinestaticprivate |
Definition at line 262 of file otel_context.h.
Referenced by clear(), get(), has_context(), and set().

|
inlinestaticprivate |
Definition at line 257 of file otel_context.h.
Referenced by clear(), get(), and set().

|
inlinestaticnodiscard |
Check if a context is set for the current thread.
Definition at line 252 of file otel_context.h.
References get_has_context().

|
inlinestatic |
Set the OpenTelemetry context for the current thread.
| ctx | Context to set |
Definition at line 222 of file otel_context.h.
References get_has_context(), and get_storage().
Referenced by kcenon::logger::otlp::otel_context_scope::otel_context_scope(), and kcenon::logger::otlp::otel_context_scope::~otel_context_scope().

