pub trait FormatSpan: 'static {
// Required methods
fn find_details<'ext>(&self, ext: &'ext Extensions<'_>) -> Option<&'ext str>;
fn add_details(&self, ext: &mut ExtensionsMut<'_>, attrs: &Attributes<'_>);
fn record_values(&self, ext: &mut ExtensionsMut<'_>, values: &Record<'_>);
}
Expand description
Determine what additional information will be attached to the performance events.
Required Methods§
Sourcefn find_details<'ext>(&self, ext: &'ext Extensions<'_>) -> Option<&'ext str>
fn find_details<'ext>(&self, ext: &'ext Extensions<'_>) -> Option<&'ext str>
Find the details in the extensions of a span that will be recorded with the event.
Sourcefn add_details(&self, ext: &mut ExtensionsMut<'_>, attrs: &Attributes<'_>)
fn add_details(&self, ext: &mut ExtensionsMut<'_>, attrs: &Attributes<'_>)
Called when a span is constructed, with its initial attributes.
This method should insert, for later consumption in Self::find_details
, a description of the details.
Sourcefn record_values(&self, ext: &mut ExtensionsMut<'_>, values: &Record<'_>)
fn record_values(&self, ext: &mut ExtensionsMut<'_>, values: &Record<'_>)
Called when a span records some values.
This method should modify, for later consumption in Self::find_details
, the description of the details.