pub struct CustomEventsSource { /* private fields */ }Expand description
Flush-thread source that runs a user callback each cycle to record custom events.
Implementations§
Source§impl CustomEventsSource
impl CustomEventsSource
Sourcepub fn new<F>(config: CustomEventsConfig, callback: F) -> Self
pub fn new<F>(config: CustomEventsConfig, callback: F) -> Self
Build a source that invokes callback at the config’s interval.
Trait Implementations§
Source§impl Debug for CustomEventsSource
impl Debug for CustomEventsSource
Source§impl Source for CustomEventsSource
impl Source for CustomEventsSource
Source§fn flush(&mut self, ctx: &FlushContext<'_>)
fn flush(&mut self, ctx: &FlushContext<'_>)
Drain pending data into the trace. Called once per flush cycle.
Source§fn on_thread_start(&mut self) -> Result<()>
fn on_thread_start(&mut self) -> Result<()>
Called when a thread joins the recorder: a Tokio worker’s first poll, or
an explicit
Dial9Handle::track_current_thread. Read moreSource§fn on_thread_stop(&mut self)
fn on_thread_stop(&mut self)
Called when a thread stops. Per-thread sources use this to stop
tracking the current thread.
Source§fn segment_metadata(&mut self, out: &mut Vec<(String, String)>)
fn segment_metadata(&mut self, out: &mut Vec<(String, String)>)
Append this source’s segment-metadata entries to
out iff they have
changed since the last call. Read moreSource§fn segment_processor(&mut self) -> Option<Box<dyn SegmentProcessor>>
fn segment_processor(&mut self) -> Option<Box<dyn SegmentProcessor>>
Available on crate feature
pipeline only.A segment-processing stage this source’s data needs, folded into the
recorder’s default pipeline at build. Called once, at build. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for CustomEventsSource
impl !Sync for CustomEventsSource
impl !UnwindSafe for CustomEventsSource
impl Freeze for CustomEventsSource
impl Send for CustomEventsSource
impl Unpin for CustomEventsSource
impl UnsafeUnpin for CustomEventsSource
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> ⓘ
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<V, F> ValueFormatter<&V> for F
impl<V, F> ValueFormatter<&V> for F
Source§const SHAPE: FieldShape<'static>
const SHAPE: FieldShape<'static>
Available on non-
metrique_require_explicit_impls only.The shape of values produced by this formatter. Read more
Source§fn format_value(writer: impl ValueWriter, value: &&V)
fn format_value(writer: impl ValueWriter, value: &&V)
Write
value to writerSource§impl<V, F> ValueFormatter<Arc<V>> for F
impl<V, F> ValueFormatter<Arc<V>> for F
Source§const SHAPE: FieldShape<'static>
const SHAPE: FieldShape<'static>
Available on non-
metrique_require_explicit_impls only.The shape of values produced by this formatter. Read more
Source§fn format_value(writer: impl ValueWriter, value: &Arc<V>)
fn format_value(writer: impl ValueWriter, value: &Arc<V>)
Write
value to writerSource§impl<V, F> ValueFormatter<Box<V>> for F
impl<V, F> ValueFormatter<Box<V>> for F
Source§const SHAPE: FieldShape<'static>
const SHAPE: FieldShape<'static>
Available on non-
metrique_require_explicit_impls only.The shape of values produced by this formatter. Read more
Source§fn format_value(writer: impl ValueWriter, value: &Box<V>)
fn format_value(writer: impl ValueWriter, value: &Box<V>)
Write
value to writerSource§impl<V, F> ValueFormatter<Cow<'_, V>> for F
impl<V, F> ValueFormatter<Cow<'_, V>> for F
Source§const SHAPE: FieldShape<'static>
const SHAPE: FieldShape<'static>
Available on non-
metrique_require_explicit_impls only.The shape of values produced by this formatter. Read more
Source§fn format_value(writer: impl ValueWriter, value: &Cow<'_, V>)
fn format_value(writer: impl ValueWriter, value: &Cow<'_, V>)
Write
value to writerSource§impl<V, F> ValueFormatter<Option<V>> for Fwhere
F: ValueFormatter<V> + ?Sized,
impl<V, F> ValueFormatter<Option<V>> for Fwhere
F: ValueFormatter<V> + ?Sized,
Source§const SHAPE: FieldShape<'static>
const SHAPE: FieldShape<'static>
Available on non-
metrique_require_explicit_impls only.The shape of values produced by this formatter. Read more
Source§fn format_value(writer: impl ValueWriter, value: &Option<V>)
fn format_value(writer: impl ValueWriter, value: &Option<V>)
Write
value to writer