pub struct DltLayer {
pub app: Arc<DltApplication>,
/* private fields */
}Expand description
COVESA DLT layer for tracing
Integrates tracing with DLT (Diagnostic Log and Trace). Spans can specify their
own DLT context via the dlt_context field; events outside spans use “DFLT” context.
See the crate-level documentation for usage examples.
Fields§
§app: Arc<DltApplication>Implementations§
Trait Implementations§
Source§impl<S> Filter<S> for DltLayer
impl<S> Filter<S> for DltLayer
Source§fn enabled(&self, meta: &Metadata<'_>, _cx: &Context<'_, S>) -> bool
fn enabled(&self, meta: &Metadata<'_>, _cx: &Context<'_, S>) -> bool
Determines if a span or event with the given metadata is enabled.
This implementation checks if the event/span level is within the current DLT maximum log level across all contexts. It also filters out internal DLT layer errors to prevent recursion.
Since we don’t know which context will be used at this point, we use the most permissive level across all contexts.
Source§fn max_level_hint(&self) -> Option<LevelFilter>
fn max_level_hint(&self) -> Option<LevelFilter>
Returns the current maximum log level from DLT.
This hint allows the tracing infrastructure to skip callsites that are more verbose than the current DLT log level, improving performance.
When the DLT log level changes (via DLT daemon or configuration), the
background task calls rebuild_interest_cache() to ensure this new hint
takes effect immediately.
This returns the most permissive (verbose) level across all contexts, since we can’t know which context will be used at callsite registration time.
§fn callsite_enabled(&self, meta: &'static Metadata<'static>) -> Interest
fn callsite_enabled(&self, meta: &'static Metadata<'static>) -> Interest
§fn event_enabled(&self, event: &Event<'_>, cx: &Context<'_, S>) -> bool
fn event_enabled(&self, event: &Event<'_>, cx: &Context<'_, S>) -> bool
Layer]'s [on_event], to determine if on_event` should be called. Read more§fn on_new_span(&self, attrs: &Attributes<'_>, id: &Id, ctx: Context<'_, S>)
fn on_new_span(&self, attrs: &Attributes<'_>, id: &Id, ctx: Context<'_, S>)
§fn on_enter(&self, id: &Id, ctx: Context<'_, S>)
fn on_enter(&self, id: &Id, ctx: Context<'_, S>)
Source§impl<S> Layer<S> for DltLayerwhere
S: Subscriber + for<'a> LookupSpan<'a>,
impl<S> Layer<S> for DltLayerwhere
S: Subscriber + for<'a> LookupSpan<'a>,
Source§fn enabled(&self, metadata: &Metadata<'_>, _ctx: Context<'_, S>) -> bool
fn enabled(&self, metadata: &Metadata<'_>, _ctx: Context<'_, S>) -> bool
true if this layer is interested in a span or event with the
given metadata in the current [Context], similarly to
Subscriber::enabled. Read moreSource§fn on_new_span(&self, attrs: &Attributes<'_>, id: &Id, ctx: Context<'_, S>)
fn on_new_span(&self, attrs: &Attributes<'_>, id: &Id, ctx: Context<'_, S>)
Attributes and Id.Source§fn on_record(&self, span: &Id, values: &Record<'_>, ctx: Context<'_, S>)
fn on_record(&self, span: &Id, values: &Record<'_>, ctx: Context<'_, S>)
Id recorded the given
values.Source§fn on_event(&self, event: &Event<'_>, ctx: Context<'_, S>)
fn on_event(&self, event: &Event<'_>, ctx: Context<'_, S>)
§fn on_register_dispatch(&self, subscriber: &Dispatch)
fn on_register_dispatch(&self, subscriber: &Dispatch)
Subscriber. Read more§fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest
fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest
Subscriber::register_callsite. Read more§fn on_follows_from(&self, _span: &Id, _follows: &Id, _ctx: Context<'_, S>)
fn on_follows_from(&self, _span: &Id, _follows: &Id, _ctx: Context<'_, S>)
span recorded that it
follows from the span with the ID follows.§fn event_enabled(&self, _event: &Event<'_>, _ctx: Context<'_, S>) -> bool
fn event_enabled(&self, _event: &Event<'_>, _ctx: Context<'_, S>) -> bool
§fn on_enter(&self, _id: &Id, _ctx: Context<'_, S>)
fn on_enter(&self, _id: &Id, _ctx: Context<'_, S>)
§fn on_exit(&self, _id: &Id, _ctx: Context<'_, S>)
fn on_exit(&self, _id: &Id, _ctx: Context<'_, S>)
§fn on_close(&self, _id: Id, _ctx: Context<'_, S>)
fn on_close(&self, _id: Id, _ctx: Context<'_, S>)
§fn on_id_change(&self, _old: &Id, _new: &Id, _ctx: Context<'_, S>)
fn on_id_change(&self, _old: &Id, _new: &Id, _ctx: Context<'_, S>)
§fn and_then<L>(self, layer: L) -> Layered<L, Self, S>where
L: Layer<S>,
Self: Sized,
fn and_then<L>(self, layer: L) -> Layered<L, Self, S>where
L: Layer<S>,
Self: Sized,
Layer, returning a Layered
struct implementing Layer. Read more§fn with_subscriber(self, inner: S) -> Layered<Self, S>where
Self: Sized,
fn with_subscriber(self, inner: S) -> Layered<Self, S>where
Self: Sized,
Layer with the given Subscriber, returning a
Layered struct that implements Subscriber. Read more