pub struct TraceRouterSink;Expand description
Built-in sink that routes modifier events through
[crate::trace_router].
Each event becomes a trace-router log line with labels
{component: "op_modifier", op: <op_label>, field: <field_name>}, formatted as "<field>=<json_value>".
Operators select which adapters / ops / fields to record via
the --trace=<spec> CLI surface.
The sink checks [crate::trace_router::enabled] before
invoking value_fn, so the JSON serialization cost is paid
only when the trace router has at least one subscribed
target.
Trait Implementations§
Source§impl ModifierTraceSink for TraceRouterSink
impl ModifierTraceSink for TraceRouterSink
Source§fn modifier_applied(
&self,
op: &str,
field: &'static str,
value_fn: &dyn Fn() -> Value,
)
fn modifier_applied( &self, op: &str, field: &'static str, value_fn: &dyn Fn() -> Value, )
Invoked from
ModifierChain::apply after a modifier
runs. value_fn produces the JSON diagnostic on demand;
the sink decides whether to invoke it.Auto Trait Implementations§
impl Freeze for TraceRouterSink
impl RefUnwindSafe for TraceRouterSink
impl Send for TraceRouterSink
impl Sync for TraceRouterSink
impl Unpin for TraceRouterSink
impl UnsafeUnpin for TraceRouterSink
impl UnwindSafe for TraceRouterSink
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more