pub struct WriterStats {
pub unattributed: u64,
pub attribution_unreported_batches: u64,
pub counter_overflow: bool,
pub accepted: u64,
pub duplicate: u64,
pub rejected: u64,
pub lost: u64,
pub unresolved: u64,
}Expand description
Terminal accounting of a writer’s lifetime, returned by
UsageWriter::shutdown. lost counts events a final flush could not
deliver; unresolved counts permits still outstanding when the drain
deadline expired — both reported, never silent.
Deliberately not Default: a zeroed report must never be conjurable
from a failure (unwrap_or_default on a dead task’s JoinError is the
bug this type’s history records — issue GL-41). Use WriterStats::ZERO
when a starting value is genuinely meant.
Fields§
§unattributed: u64Confirmed unattributed newly accepted events. Lost acknowledgements followed by duplicate replies cannot reconstruct historical counts.
attribution_unreported_batches: u64Acknowledged batches whose sink did not report attribution support.
counter_overflow: boolAt least one cumulative outcome exceeded u64; its value is saturated.
accepted: u64Events the sink newly recorded: billed.
duplicate: u64Events whose request id the sink had already recorded, from a retried batch whose acknowledgement was lost. Ingest is idempotent (INVARIANTS.md 7), so these are not double charges; a steady rate points at acknowledgements lost to timeouts.
rejected: u64Events the sink refused: unknown lease, lease-capability mismatch, no
remaining accounting capacity, or units outside its storage domain.
Bounded billing loss that has already happened, left for
reconciliation. Normal is zero; a trickle usually means events land
after their lease settled, so the drain deadline sits too close to
expiry_safety_margin + reclaim_grace.
lost: u64Events that will never reach the ledger: batches the sink refused
with a non-retryable error, and events the final flush could not
deliver before its deadline. Any nonzero value is committed charges
that went unbilled. A healthy but unreachable sink leaves this at zero
until shutdown, so alert on WriterHealth::ingest_age instead.
unresolved: u64Permits (in-flight requests or committed guards) that neither sent nor dropped before the drain deadline. Their charges are locally committed but unbilled; TTL reclaim bounds them (INVARIANTS.md GL-9).
Implementations§
Source§impl WriterStats
impl WriterStats
Sourcepub const ZERO: WriterStats
pub const ZERO: WriterStats
A writer that has accounted for nothing yet.
Trait Implementations§
Source§impl Clone for WriterStats
impl Clone for WriterStats
impl Copy for WriterStats
Source§impl Debug for WriterStats
impl Debug for WriterStats
impl Eq for WriterStats
Source§impl PartialEq for WriterStats
impl PartialEq for WriterStats
impl StructuralPartialEq for WriterStats
Auto Trait Implementations§
impl Freeze for WriterStats
impl RefUnwindSafe for WriterStats
impl Send for WriterStats
impl Sync for WriterStats
impl Unpin for WriterStats
impl UnsafeUnpin for WriterStats
impl UnwindSafe for WriterStats
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.