pub struct Metrics {
pub bursts: AtomicU64,
pub burst_items: AtomicU64,
pub pending: AtomicI64,
pub delivery_latency_us: AtomicU64,
pub deliveries: AtomicU64,
pub ack_lane_retry: AtomicU64,
pub ack_lane_poisoned: AtomicU64,
pub stream_rebuilds: AtomicU64,
pub concurrency_rejects: AtomicU64,
pub type_reconcile: AtomicU64,
pub type_reconcile_unreconcilable: AtomicU64,
}Expand description
Atomic counters and gauges for one sink.
Fields§
§bursts: AtomicU64Number of ack-lane bursts processed.
burst_items: AtomicU64Total items across all bursts (÷ bursts = coalesce ratio; ≫1 = pipelining).
pending: AtomicI64submitted − delivered; climbs under load.
delivery_latency_us: AtomicU64Sum of delivery latencies (µs), emitted from the ack lane off the hot path.
deliveries: AtomicU64Count of delivery-latency samples.
ack_lane_retry: AtomicU64Transient ack retries (environmental slow-ack).
ack_lane_poisoned: AtomicU64Ack lanes that died (self-inflicted poison) — the cause signal the runbook branches on, distinct from the shared slow-ack symptom.
stream_rebuilds: AtomicU64Stream rebuilds (churn visibility — the predecessor’s blind spot).
concurrency_rejects: AtomicU64Concurrency-limit rejects (the too-many-streams signal).
type_reconcile: AtomicU64Emit-time type reconciliations performed (auto-project / passthrough).
type_reconcile_unreconcilable: AtomicU64Unreconcilable write-boundary mismatches surfaced loudly (column named).
Implementations§
Source§impl Metrics
impl Metrics
Sourcepub fn record_burst(&self, items: usize, latency_us: u64)
pub fn record_burst(&self, items: usize, latency_us: u64)
Record that a burst of items was delivered with latency_us total.
Sourcepub fn coalesce_ratio(&self) -> f64
pub fn coalesce_ratio(&self) -> f64
Mean burst size — the “are we pipelining?” signal (≫1 under load). The
counts are approximate telemetry, so the f64 conversion’s precision loss
at astronomically large totals is immaterial.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Metrics
impl RefUnwindSafe for Metrics
impl Send for Metrics
impl Sync for Metrics
impl Unpin for Metrics
impl UnwindSafe for Metrics
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].