Skip to main content

LogTrace

Trait LogTrace 

Source
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§

Source

fn correlation_id(&self) -> Uuid

Source

fn span_id(&self) -> u64

Source

fn parent_id(&self) -> Option<u64>

Source

fn neuron_name(&self) -> String

Provided Methods§

Source

fn trace_context(&self) -> TraceContext

Returns the full trace context.

Source

fn span_info(&self, name: &'static str) -> Span

Returns a tracing span with the tracing fields attached at INFO level.

Source

fn span_debug(&self, name: &'static str) -> Span

Returns a tracing span with the tracing fields attached at DEBUG level.

Implementations on Foreign Types§

Source§

impl LogTrace for Uuid

Source§

fn correlation_id(&self) -> Uuid

Source§

fn span_id(&self) -> u64

Source§

fn parent_id(&self) -> Option<u64>

Source§

fn neuron_name(&self) -> String

Source§

fn span_info(&self, name: &'static str) -> Span

Source§

fn span_debug(&self, name: &'static str) -> Span

Source§

impl<P: LogTrace + ?Sized> LogTrace for Arc<P>

Implementors§

Source§

impl LogTrace for SimplePayloadRawErased

Source§

impl LogTrace for TraceContext

Source§

impl<T, C> LogTrace for PayloadErasedWrapper<T, C>
where T: Send + Sync + 'static, C: Codec<T> + CodecName + Send + Sync + 'static,

Source§

impl<T, C> LogTrace for PayloadRawErasedWrapper<T, C>
where T: Send + Sync + 'static, C: Codec<T> + CodecName + Send + Sync + 'static,

Source§

impl<T, C> LogTrace for Payload<T, C>
where T: Send + Sync + 'static, C: Codec<T> + CodecName + Send + Sync + 'static,

Source§

impl<T, C> LogTrace for PayloadRaw<T, C>
where T: Send + Sync + 'static, C: Codec<T> + CodecName + Send + Sync + 'static,