|
Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
|
Context metadata for thread-specific information. More...
#include <thread_context.h>

Public Member Functions | |
| context_metadata (std::string req_id="") | |
| Construct context metadata with an optional request ID. | |
| bool | empty () const |
| Check if all metadata fields are empty. | |
| void | set_tag (const std::string &key, const std::string &value) |
| Set a custom tag on this context. | |
| std::string | get_tag (const std::string &key) const |
| Retrieve a tag value by key. | |
Public Attributes | |
| std::string | request_id |
| Unique identifier for the current request. | |
| std::string | correlation_id |
| Correlation ID for tracing across services. | |
| std::string | user_id |
| User identifier associated with the request. | |
| std::unordered_map< std::string, std::string > | tags |
| Arbitrary key-value tags. | |
Context metadata for thread-specific information.
Lightweight metadata struct for attaching request-scoped information to the current thread. Useful for correlating log entries and metrics with specific requests.
Definition at line 57 of file thread_context.h.
|
inlineexplicit |
Construct context metadata with an optional request ID.
| req_id | Request identifier (defaults to empty string) |
Definition at line 67 of file thread_context.h.
|
inline |
Check if all metadata fields are empty.
Definition at line 74 of file thread_context.h.
References correlation_id, request_id, tags, and user_id.
Referenced by TEST(), TEST(), and TEST_F().

|
inline |
|
inline |
| std::string kcenon::monitoring::context_metadata::correlation_id |
| std::string kcenon::monitoring::context_metadata::request_id |
| std::unordered_map<std::string, std::string> kcenon::monitoring::context_metadata::tags |
| std::string kcenon::monitoring::context_metadata::user_id |