Skip to main content

DumpTrigger

Struct DumpTrigger 

Source
pub struct DumpTrigger { /* private fields */ }
Available on crate feature 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

Source

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.

Source

pub fn dump_current_data(&self) -> DumpRun<'_>

Capture everything the ring still holds, right now. No forward window.

Source

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

Source§

fn clone(&self) -> DumpTrigger

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DumpTrigger

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<V, F> ValueFormatter<&V> for F
where F: ValueFormatter<V> + ?Sized, V: ?Sized,

Source§

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)

Write value to writer
Source§

impl<V, F> ValueFormatter<Arc<V>> for F
where F: ValueFormatter<V> + ?Sized, V: ?Sized,

Source§

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>)

Write value to writer
Source§

impl<V, F> ValueFormatter<Box<V>> for F
where F: ValueFormatter<V> + ?Sized, V: ?Sized,

Source§

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>)

Write value to writer
Source§

impl<V, F> ValueFormatter<Cow<'_, V>> for F
where V: ToOwned + ?Sized, F: ValueFormatter<V> + ?Sized,

Source§

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>)

Write value to writer
Source§

impl<V, F> ValueFormatter<Option<V>> for F
where F: ValueFormatter<V> + ?Sized,

Source§

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>)

Write value to writer
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more