pub struct DumpTrigger { /* private fields */ }pipeline only.Expand description
Sending half of the trigger channel.
Cloneable; reach it from any thread owned by the runtime via
Dial9Handle::dump_trigger
and hand it to whatever subsystem decides when to dump (an idle-ratio
watcher, a panic hook, a /dump HTTP handler, …). Every clone shares the
debounce gate configured by DumpTriggerConfig::debounce.
Implementations§
Source§impl DumpTrigger
impl DumpTrigger
Sourcepub fn with_debounce(self, window: Duration) -> Self
pub fn with_debounce(self, window: Duration) -> Self
Coalesce duplicate triggers within window into a single dump.
Applied once at build time from DumpTriggerConfig::debounce; every
dump_trigger clone
then shares one gate. The first trigger in a quiet period dispatches
normally; any trigger arriving within window of that dispatch resolves
DumpError::Coalesced (naming the dump it folded into) without
starting a new dump. Useful when a single source - a watcher that
re-trips every poll, a hot path that dumps per slow request - would
otherwise fire a burst of near-identical dumps.
Sourcepub fn dump_current_data(&self) -> DumpRun<'_>
pub fn dump_current_data(&self) -> DumpRun<'_>
Capture everything the ring still holds, right now. No forward window.
Sourcepub fn dump_time_range(
&self,
lookback: Duration,
lookforward: Duration,
) -> DumpRun<'_>
pub fn dump_time_range( &self, lookback: Duration, lookforward: Duration, ) -> DumpRun<'_>
Capture the window [trigger - lookback, trigger + lookforward].
Either side may be Duration::ZERO.
lookback captures pre-trigger segments; you can look back only as
far as the ring still retains, so a lookback wider than the
retained history is best-effort and captures what survived.
lookforward keeps the dump open until trigger + lookforward,
attaching segments as they seal; it is bounded only by the process
lifetime and is best-effort under upload pressure. The actual
covered span is reported on DumpReceipt::time_range. This never
errors and never resizes or pins the ring.
Trait Implementations§
Source§impl Clone for DumpTrigger
impl Clone for DumpTrigger
Source§fn clone(&self) -> DumpTrigger
fn clone(&self) -> DumpTrigger
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for DumpTrigger
impl RefUnwindSafe for DumpTrigger
impl Send for DumpTrigger
impl Sync for DumpTrigger
impl Unpin for DumpTrigger
impl UnsafeUnpin for DumpTrigger
impl UnwindSafe for DumpTrigger
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
metrique_require_explicit_impls only.Source§fn format_value(writer: impl ValueWriter, value: &&V)
fn format_value(writer: impl ValueWriter, value: &&V)
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>
metrique_require_explicit_impls only.Source§fn format_value(writer: impl ValueWriter, value: &Arc<V>)
fn format_value(writer: impl ValueWriter, value: &Arc<V>)
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>
metrique_require_explicit_impls only.Source§fn format_value(writer: impl ValueWriter, value: &Box<V>)
fn format_value(writer: impl ValueWriter, value: &Box<V>)
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>
metrique_require_explicit_impls only.Source§fn format_value(writer: impl ValueWriter, value: &Cow<'_, V>)
fn format_value(writer: impl ValueWriter, value: &Cow<'_, V>)
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>
metrique_require_explicit_impls only.Source§fn format_value(writer: impl ValueWriter, value: &Option<V>)
fn format_value(writer: impl ValueWriter, value: &Option<V>)
value to writer