pub trait LogTrace {
// Required methods
fn correlation_id(&self) -> Uuid;
fn span_id(&self) -> u64;
fn parent_id(&self) -> Option<u64>;
fn neuron_name(&self) -> String;
// Provided methods
fn trace_context(&self) -> TraceContext { ... }
fn span_info(&self, name: &'static str) -> Span { ... }
fn span_debug(&self, name: &'static str) -> Span { ... }
}Expand description
Trait for types that can provide tracing context for logging.
Required Methods§
fn correlation_id(&self) -> Uuid
fn span_id(&self) -> u64
fn parent_id(&self) -> Option<u64>
fn neuron_name(&self) -> String
Provided Methods§
Sourcefn trace_context(&self) -> TraceContext
fn trace_context(&self) -> TraceContext
Returns the full trace context.
Sourcefn span_info(&self, name: &'static str) -> Span
fn span_info(&self, name: &'static str) -> Span
Returns a tracing span with the tracing fields attached at INFO level.
Sourcefn span_debug(&self, name: &'static str) -> Span
fn span_debug(&self, name: &'static str) -> Span
Returns a tracing span with the tracing fields attached at DEBUG level.