Trait nakadion::metrics::MetricsCollector [−][src]
pub trait MetricsCollector { fn streaming_connect_attempt(&self); fn streaming_connect_attempt_failed(&self); fn consumer_connected(&self, attempt_started: Instant); fn consumer_connection_lifetime(&self, connected_since: Instant); fn consumer_line_received(&self, bytes: usize); fn consumer_info_line_received(&self, bytes: usize); fn consumer_keep_alive_line_received(&self, bytes: usize); fn consumer_batch_line_received(&self, bytes: usize); fn consumer_batch_received(&self, batch_received_at_timestamp: Instant); fn dispatcher_batch_received(&self, batch_received_at_timestamp: Instant); fn dispatcher_current_workers(&self, num_workers: usize); fn worker_worker_started(&self); fn worker_worker_stopped(&self); fn worker_batch_received(&self, batch_received_at_timestamp: Instant); fn worker_batch_size_bytes(&self, bytes: usize); fn worker_batch_processed(&self, started: Instant); fn worker_events_in_same_batch_processed(&self, n: usize); fn committer_batch_received(&self, batch_received_at_timestamp: Instant); fn committer_cursor_commit_attempt(&self, commit_attempt_started: Instant); fn committer_cursor_committed(&self, commit_attempt_started: Instant); fn committer_cursor_commit_failed(&self, commit_attempt_started: Instant); fn committer_batches_committed(&self, n: usize); fn committer_events_committed(&self, n: usize); fn committer_first_cursor_age_on_commit(&self, age: Duration); fn committer_last_cursor_age_on_commit(&self, age: Duration); fn committer_cursor_buffer_time(&self, time_buffered: Duration); fn committer_time_left_on_commit_until_invalid(&self, time_left: Duration); fn other_panicked(&self); fn other_dispatcher_gone(&self); fn other_worker_gone(&self); fn other_committer_gone(&self); }
An interface for a Nakadion
that Nakadion
can use to notify
on changing values and states.
Required Methods
fn streaming_connect_attempt(&self)
A connect attempt for streaming has been made.
fn streaming_connect_attempt_failed(&self)
A connect attempt for streaming failed.
fn consumer_connected(&self, attempt_started: Instant)
A connect attempt the consumer requested succeeded.
Parameters
- attempt_started: The timestampt when the attempt to establish a connection was started
fn consumer_connection_lifetime(&self, connected_since: Instant)
The instant of when the connection that just shut down was initiated. Used to determine for how long Nakadion was connected.
fn consumer_line_received(&self, bytes: usize)
A line with the given number of bytes was reveived.
fn consumer_info_line_received(&self, bytes: usize)
A line with an info field was received. The info fieldhad bytes bytes..
fn consumer_keep_alive_line_received(&self, bytes: usize)
A keep alive line with the given number of bytes was reveived.
fn consumer_batch_line_received(&self, bytes: usize)
A line of events with the given number of bytes was reveived.
fn consumer_batch_received(&self, batch_received_at_timestamp: Instant)
Time elapsed from receiving the batch from Nakadi
.
fn dispatcher_batch_received(&self, batch_received_at_timestamp: Instant)
Time elapsed from receiving the batch from Nakadi
.
fn dispatcher_current_workers(&self, num_workers: usize)
The number of workers currently processing partitions.
fn worker_worker_started(&self)
A worker was started
fn worker_worker_stopped(&self)
A worker was stopped
fn worker_batch_received(&self, batch_received_at_timestamp: Instant)
Time elapsed from receiving the batch from Nakadi
.
fn worker_batch_size_bytes(&self, bytes: usize)
Events with a comined legth of bytes
bytes have been
received.
fn worker_batch_processed(&self, started: Instant)
A batch has been processed where processing was started at 'started`.
fn worker_events_in_same_batch_processed(&self, n: usize)
The worker processed n
events of the same batch.
fn committer_batch_received(&self, batch_received_at_timestamp: Instant)
Time elapsed from receiving the batch from Nakadi
.
fn committer_cursor_commit_attempt(&self, commit_attempt_started: Instant)
A commit attempt has been made. It was started at commit_attempt_started
.
No difference is made between success and failure.
fn committer_cursor_committed(&self, commit_attempt_started: Instant)
A cursor has been committed and the instant when the commit attempt was started is given.
fn committer_cursor_commit_failed(&self, commit_attempt_started: Instant)
A cursor has not been committed and the instant when the commit attempt was started is given.
fn committer_batches_committed(&self, n: usize)
The number of batches that have been committed with the last cursor.
fn committer_events_committed(&self, n: usize)
The number of events that have been committed with the last cursor.
fn committer_first_cursor_age_on_commit(&self, age: Duration)
How old is this cursor first(oldest) that is committed with the current cursor?
received_at
is the timestamp when Nakadion
received the batch
fn committer_last_cursor_age_on_commit(&self, age: Duration)
How old is this cursor that is currently committed?
This is the cursor that also commits the previously buffered cursors.
received_at
is the timestamp when Nakadion
received the batch
fn committer_cursor_buffer_time(&self, time_buffered: Duration)
How much time has elapsed from receiving intial cursor to be committed until that cursor finally got committed?
fn committer_time_left_on_commit_until_invalid(&self, time_left: Duration)
The time left when committing the cursor until the stream would have become invalid.
fn other_panicked(&self)
A panic occured somewhere.
fn other_dispatcher_gone(&self)
fn other_worker_gone(&self)
fn other_committer_gone(&self)
Implementors
impl MetricsCollector for DevNullMetricsCollector