pub struct SinkShardMetrics { /* private fields */ }Expand description
Sink-shard handles (etl_sink_*), one struct per shard worker.
Implementations§
Source§impl SinkShardMetrics
impl SinkShardMetrics
Sourcepub fn new(
labels: &ComponentLabels,
shard: u32,
replicas: &[String],
e2e_basis: E2eBasis,
) -> SinkShardMetrics
pub fn new( labels: &ComponentLabels, shard: u32, replicas: &[String], e2e_basis: E2eBasis, ) -> SinkShardMetrics
Resolve all handles for one shard. replicas are display names used
as the replica label (bounded by cluster topology). e2e_basis
selects the time base for etl_e2e_latency_seconds (see
docs/METRICS.md).
Call after install: handles bind to
the recorder present at construction, and a handle built before the
exporter exists silently records into the void.
Sourcepub fn e2e_observed(&self, ingest_age: Duration, oldest_event_ms: i64)
pub fn e2e_observed(&self, ingest_age: Duration, oldest_event_ms: i64)
Observe end-to-end latency for one durably written batch, from its
oldest record. ingest_age is time since that record entered the
terminal stage; oldest_event_ms is its source event time. The
configured basis picks which one lands in the histogram (event
basis falls back to ingest when no event time was available).
Sourcepub fn flushed(&self, reason: FlushReason, rows: u64, bytes: u64, d: Duration)
pub fn flushed(&self, reason: FlushReason, rows: u64, bytes: u64, d: Duration)
Record one durably acknowledged flush.
Sourcepub fn errors(&self, class: ErrorClass, n: u64)
pub fn errors(&self, class: ErrorClass, n: u64)
Count write errors of one taxonomy class.
Sourcepub fn set_inflight(&self, batches: usize)
pub fn set_inflight(&self, batches: usize)
Set the number of sealed batches currently in flight.
Sourcepub fn set_replica_healthy(&self, replica: usize, healthy: bool)
pub fn set_replica_healthy(&self, replica: usize, healthy: bool)
Mark one replica healthy (circuit closed) or quarantined (open).
Sourcepub fn breaker_opened(&self, replica: usize)
pub fn breaker_opened(&self, replica: usize)
Count a circuit-breaker open transition on one replica.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SinkShardMetrics
impl !RefUnwindSafe for SinkShardMetrics
impl Send for SinkShardMetrics
impl Sync for SinkShardMetrics
impl Unpin for SinkShardMetrics
impl UnsafeUnpin for SinkShardMetrics
impl !UnwindSafe for SinkShardMetrics
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more