Trait tracing_fluentd::FieldFormatter
source · pub trait FieldFormatter: 'static {
// Required method
fn on_event<'a, R: LookupSpan<'a>>(
&self,
record: &mut Record,
event: &Event<'_>,
current_span: Option<SpanRef<'a, R>>
);
// Provided methods
fn on_new_span<C: Collect + for<'a> LookupSpan<'a>>(
&self,
attrs: &Attributes<'_>,
id: &Id,
ctx: Context<'_, C>
) { ... }
fn on_record<C: Collect + for<'a> LookupSpan<'a>>(
&self,
id: &Id,
values: &Record<'_>,
ctx: Context<'_, C>
) { ... }
}
Expand description
Describes how compose event fields.
Required Methods§
Provided Methods§
sourcefn on_new_span<C: Collect + for<'a> LookupSpan<'a>>(
&self,
attrs: &Attributes<'_>,
id: &Id,
ctx: Context<'_, C>
)
fn on_new_span<C: Collect + for<'a> LookupSpan<'a>>( &self, attrs: &Attributes<'_>, id: &Id, ctx: Context<'_, C> )
Handler for when Layer::new_span
is invoked.
By default uses span’s extensions to store fluent::Map
containing attributes of the span.