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

A connect attempt for streaming has been made.

A connect attempt for streaming failed.

A connect attempt the consumer requested succeeded.

Parameters

  • attempt_started: The timestampt when the attempt to establish a connection was started

The instant of when the connection that just shut down was initiated. Used to determine for how long Nakadion was connected.

A line with the given number of bytes was reveived.

A line with an info field was received. The info fieldhad bytes bytes..

A keep alive line with the given number of bytes was reveived.

A line of events with the given number of bytes was reveived.

Time elapsed from receiving the batch from Nakadi.

Time elapsed from receiving the batch from Nakadi.

The number of workers currently processing partitions.

A worker was started

A worker was stopped

Time elapsed from receiving the batch from Nakadi.

Events with a comined legth of bytes bytes have been received.

A batch has been processed where processing was started at 'started`.

The worker processed n events of the same batch.

Time elapsed from receiving the batch from Nakadi.

A commit attempt has been made. It was started at commit_attempt_started. No difference is made between success and failure.

A cursor has been committed and the instant when the commit attempt was started is given.

A cursor has not been committed and the instant when the commit attempt was started is given.

The number of batches that have been committed with the last cursor.

The number of events that have been committed with the last cursor.

How old is this cursor first(oldest) that is committed with the current cursor? received_at is the timestamp when Nakadion received the batch

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

How much time has elapsed from receiving intial cursor to be committed until that cursor finally got committed?

The time left when committing the cursor until the stream would have become invalid.

A panic occured somewhere.

Implementors