Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
Loading...
Searching...
No Matches
kcenon::monitoring::concepts::TracingContextLike Concept Reference

A type that represents a tracing context. More...

#include <monitoring_concepts.h>

Concept definition

template<typename T>
concept kcenon::monitoring::concepts::TracingContextLike = requires(const T t) {
{ t.get_trace_id() } -> std::convertible_to<std::string>;
{ t.get_span_id() } -> std::convertible_to<std::string>;
}
A type that represents a tracing context.

Detailed Description

A type that represents a tracing context.

Tracing contexts provide trace and span identification.

Example usage:

template<TracingContextLike C>
void start_span(C& context, const std::string& name) {
auto trace_id = context.get_trace_id();
// Create new span
}

Definition at line 321 of file monitoring_concepts.h.