[][src]Struct tracing_bunyan_formatter::JsonStorageLayer

pub struct JsonStorageLayer;

This layer is only concerned with information storage, it does not do any formatting or provide any output.

It's purpose is to store the fields associated to spans in an easy-to-consume format for downstream layers concerned with emitting a formatted representation of spans or events.

Trait Implementations

impl Clone for JsonStorageLayer[src]

impl Debug for JsonStorageLayer[src]

impl<S: Subscriber + for<'a> LookupSpan<'a>> Layer<S> for JsonStorageLayer[src]

fn new_span(&self, attrs: &Attributes, id: &Id, ctx: Context<S>)[src]

Span creation. This is the only occasion we have to store the fields attached to the span given that they might have been borrowed from the surrounding context.

fn on_enter(&self, span: &Id, ctx: Context<S>)[src]

When we enter a span for the first time save the timestamp in its extensions.

fn on_close(&self, span: Id, ctx: Context<S>)[src]

When we close a span, register how long it took in milliseconds.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.