pub struct ReplicationMetrics { /* private fields */ }Expand description
Pull-based metrics for a replication stream.
Shared between the background worker (which updates the counters) and the
consumer (which reads them via ReplicationClient::metrics). All updates
use relaxed atomics, so the worker’s hot path never blocks and reads are
cheap. Counters are monotonic for the lifetime of the connection.
Implementations§
Source§impl ReplicationMetrics
impl ReplicationMetrics
Sourcepub fn events_forwarded(&self) -> u64
pub fn events_forwarded(&self) -> u64
Replication events successfully forwarded to the consumer channel.
Sourcepub fn feedback_sent(&self) -> u64
pub fn feedback_sent(&self) -> u64
Standby-status (feedback) messages sent to the server.
Sourcepub fn keepalive_replies(&self) -> u64
pub fn keepalive_replies(&self) -> u64
Feedback messages sent specifically in reply to a reply-requested
keepalive. A subset of feedback_sent.
Sourcepub fn stall_count(&self) -> u64
pub fn stall_count(&self) -> u64
Number of times forwarding an event had to wait for channel capacity (i.e. the consumer applied backpressure).
Sourcepub fn stall_micros_total(&self) -> u64
pub fn stall_micros_total(&self) -> u64
Cumulative time, in microseconds, the worker spent waiting for channel capacity while backpressured. Feedback continues throughout this time.
Sourcepub fn last_applied_lsn(&self) -> Lsn
pub fn last_applied_lsn(&self) -> Lsn
Most recent applied LSN reported to the server via feedback.
Sourcepub fn last_wal_end(&self) -> Lsn
pub fn last_wal_end(&self) -> Lsn
Most recent server WAL-end position observed on an incoming message.