[−][src]Trait nakadion::instrumentation::Instruments
An interface on which Nakadion
exposes metrics
An implementor of this interface can be used with
Instrumentation::new
Implementations of this trait should not be shared with multiple consumers since they are stateful e.g. in flight batches.
Provided methods
pub fn consumer_started(&self)
[src]
pub fn consumer_stopped(&self, _ran_for: Duration)
[src]
pub fn streaming_ended(&self, _streamed_for: Duration)
[src]
pub fn stream_connect_attempt_success(&self, _time: Duration)
[src]
Triggered when a single connect attempt for a stream was successful
time
is the time for the request
pub fn stream_connect_attempt_failed(&self, _time: Duration)
[src]
Triggered when a single connect attempt for a stream failed
time
is the time for the request
pub fn stream_connected(&self, _time: Duration)
[src]
Triggered when a stream was finally connect after maybe multiple attempts
time
is the time for the whole cycle until a connection was made
pub fn stream_not_connected(&self, _time: Duration, _err: &ConnectError)
[src]
Triggered when connecting to a stream finally failed after maybe multiple attempts
time
is the time for the whole cycle until a connection attempts finally failed
pub fn stream_chunk_received(&self, _n_bytes: usize)
[src]
A chunk of data with n_bytes
was received over the network
pub fn stream_frame_completed(&self, _n_bytes: usize, _time: Duration)
[src]
Chunks have been assembled to a complete frame containing all required data
pub fn stream_tick_emitted(&self)
[src]
An internal tick signal has been emitted
pub fn info_frame_received(
&self,
_frame_started_at: Instant,
_frame_completed_at: Instant
)
[src]
&self,
_frame_started_at: Instant,
_frame_completed_at: Instant
)
The controller received a frame which contained info data
The time it took from receiving the first chunk until it reached the controller are passed along with the complete bytes of the frame
pub fn keep_alive_frame_received(
&self,
_frame_started_at: Instant,
_frame_completed_at: Instant
)
[src]
&self,
_frame_started_at: Instant,
_frame_completed_at: Instant
)
The controller received a frame which contained no events
The time it took from receiving the first chunk until it reached the controller are passed along with the complete bytes of the frame
pub fn batch_frame_received(
&self,
_frame_started_at: Instant,
_frame_completed_at: Instant,
_events_bytes: usize
)
[src]
&self,
_frame_started_at: Instant,
_frame_completed_at: Instant,
_events_bytes: usize
)
A partition which was formerly not known to be active was sent data on The controller received a frame which contained events
The time it took from receiving the first chunk until it reached the controller are passed along with the complete bytes of the frame
pub fn batch_frame_gap(&self, _gap: Duration)
[src]
The time elapsed between the reception of 2 batches with events
pub fn no_frames_warning(&self, _no_frames_for: Duration)
[src]
No frames have been received for the given time and the warning has already threshold elapsed
pub fn no_events_warning(&self, _no_events_for: Duration)
[src]
No events have been received for the given time and the warning threshold has already elapsed
pub fn stream_dead(&self, _after: Duration)
[src]
pub fn stream_error(&self, _err: &EventStreamError)
[src]
The stream was aborted due to a streaming related error
pub fn stream_unconsumed_events(&self, _n_unconsumed: usize)
[src]
Tracks the number of unconsumed events.
Only available if the Consumer
was created with a clients that
supports the SubscriptionApi
pub fn batches_in_flight_incoming(&self, _stats: &EventStreamBatchStats)
[src]
Triggered when a new batch with events was received
pub fn batches_in_flight_processed(&self, _stats: &EventStreamBatchStats)
[src]
Triggered when a batch with events was processed
pub fn in_flight_stats_reset(&self)
[src]
Usually triggered when there are still batches in flight and the stream aborts.
This is a correction for the inflight metrics and uncommitted events metrics
pub fn event_type_partition_activated(&self)
[src]
pub fn event_type_partition_deactivated(&self, _active_for: Duration)
[src]
A partition did not receive data for some time is is therefore considered inactive.
pub fn batch_processing_started(
&self,
_frame_started_at: Instant,
_frame_completed_at: Instant
)
[src]
&self,
_frame_started_at: Instant,
_frame_completed_at: Instant
)
pub fn batch_processed(&self, _n_bytes: usize, _time: Duration)
[src]
Events were processed.
pub fn batch_processed_n_events(&self, _n_events: usize)
[src]
Events were processed.
pub fn batch_deserialized(&self, _n_bytes: usize, _time: Duration)
[src]
Events have been deserialized.
The amount of bytes deserialized and the time it took are passed.
pub fn cursor_to_commit_received(
&self,
_frame_started_at: Instant,
_frame_completed_at: Instant
)
[src]
&self,
_frame_started_at: Instant,
_frame_completed_at: Instant
)
Cursors to be committed have reached the commit stage.
The time it took from receiving the first chunk until it reached the commit stage are passed
pub fn cursors_commit_triggered(&self, _trigger: CommitTrigger)
[src]
Cursors commit was triggered.
pub fn cursor_ages_on_commit_attempt(
&self,
_first_cursor_age: Duration,
_last_cursor_age: Duration,
_first_cursor_age_warning: bool
)
[src]
&self,
_first_cursor_age: Duration,
_last_cursor_age: Duration,
_first_cursor_age_warning: bool
)
Ages of the cursors when making a commit attempt to Nakadi
This ages are measured before making an attempt to make a call to Nakadi.
first_cursor_age
is the critical age of the first cursor which might be commited
with a later cursor which has the age last_cursor_age
.
`` should be true, when the first cursor reached a critical age which might endanger or even cause the commit to fail.
pub fn cursors_committed(&self, _n_cursors: usize, _time: Duration)
[src]
Cursors were successfully committed.
The time request took is passed. A call to this method must not
influence the uncommitted batches stats. Use batches_committed
instead.
pub fn batches_committed(&self, _n_batches: usize, _n_events: usize)
[src]
Tracks what has been committed to track uncommitted batches and their events.
Collected values should be reset by in_flight_stats_reset
pub fn cursors_not_committed(
&self,
_n_cursors: usize,
_time: Duration,
_err: &CommitError
)
[src]
&self,
_n_cursors: usize,
_time: Duration,
_err: &CommitError
)
Cursors were not successfully committed.
The time request took is passed
pub fn commit_cursors_attempt_failed(&self, _n_cursors: usize, _time: Duration)
[src]
An attempt to commit cursors failed. There might still be a retry
The time request took is passed
pub fn stream_parameters(&self, _params: &StreamParameters)
[src]
Can be used to transmit limits and values via metrics
This function s not called at high frequency
Implementors
impl Instruments for Metrix
[src]
pub fn consumer_started(&self)
[src]
pub fn consumer_stopped(&self, ran_for: Duration)
[src]
pub fn streaming_ended(&self, streamed_for: Duration)
[src]
pub fn stream_connect_attempt_success(&self, time: Duration)
[src]
pub fn stream_connect_attempt_failed(&self, time: Duration)
[src]
pub fn stream_connected(&self, time: Duration)
[src]
pub fn stream_not_connected(&self, time: Duration, _err: &ConnectError)
[src]
pub fn stream_chunk_received(&self, n_bytes: usize)
[src]
pub fn stream_frame_completed(&self, n_bytes: usize, time: Duration)
[src]
pub fn stream_tick_emitted(&self)
[src]
pub fn info_frame_received(
&self,
_frame_started_at: Instant,
frame_completed_at: Instant
)
[src]
&self,
_frame_started_at: Instant,
frame_completed_at: Instant
)
pub fn keep_alive_frame_received(
&self,
_frame_started_at: Instant,
frame_completed_at: Instant
)
[src]
&self,
_frame_started_at: Instant,
frame_completed_at: Instant
)
pub fn batch_frame_received(
&self,
_frame_started_at: Instant,
frame_completed_at: Instant,
events_bytes: usize
)
[src]
&self,
_frame_started_at: Instant,
frame_completed_at: Instant,
events_bytes: usize
)
pub fn batch_frame_gap(&self, gap: Duration)
[src]
pub fn no_frames_warning(&self, no_frames_for: Duration)
[src]
pub fn no_events_warning(&self, no_events_for: Duration)
[src]
pub fn stream_dead(&self, after: Duration)
[src]
pub fn stream_error(&self, err: &EventStreamError)
[src]
pub fn stream_unconsumed_events(&self, n_unconsumed: usize)
[src]
pub fn batches_in_flight_incoming(&self, stats: &EventStreamBatchStats)
[src]
pub fn batches_in_flight_processed(&self, stats: &EventStreamBatchStats)
[src]
pub fn in_flight_stats_reset(&self)
[src]
pub fn event_type_partition_activated(&self)
[src]
pub fn event_type_partition_deactivated(&self, active_for: Duration)
[src]
pub fn batch_processing_started(
&self,
_frame_started_at: Instant,
frame_completed_at: Instant
)
[src]
&self,
_frame_started_at: Instant,
frame_completed_at: Instant
)
pub fn batch_processed(&self, n_bytes: usize, time: Duration)
[src]
pub fn batch_processed_n_events(&self, n_events: usize)
[src]
pub fn batch_deserialized(&self, n_bytes: usize, time: Duration)
[src]
pub fn cursor_to_commit_received(
&self,
_frame_started_at: Instant,
frame_completed_at: Instant
)
[src]
&self,
_frame_started_at: Instant,
frame_completed_at: Instant
)
pub fn cursors_commit_triggered(&self, trigger: CommitTrigger)
[src]
pub fn cursor_ages_on_commit_attempt(
&self,
first_cursor_age: Duration,
last_cursor_age: Duration,
first_cursor_age_warning: bool
)
[src]
&self,
first_cursor_age: Duration,
last_cursor_age: Duration,
first_cursor_age_warning: bool
)
pub fn cursors_committed(&self, n_cursors: usize, time: Duration)
[src]
pub fn batches_committed(&self, n_batches: usize, n_events: usize)
[src]
pub fn cursors_not_committed(
&self,
n_cursors: usize,
time: Duration,
_err: &CommitError
)
[src]
&self,
n_cursors: usize,
time: Duration,
_err: &CommitError
)
pub fn commit_cursors_attempt_failed(&self, n_cursors: usize, time: Duration)
[src]
pub fn stream_parameters(&self, params: &StreamParameters)
[src]
impl Instruments for Instrumentation
[src]
pub fn consumer_started(&self)
[src]
pub fn consumer_stopped(&self, ran_for: Duration)
[src]
pub fn streaming_ended(&self, streamed_for: Duration)
[src]
pub fn stream_connect_attempt_success(&self, time: Duration)
[src]
pub fn stream_connect_attempt_failed(&self, time: Duration)
[src]
pub fn stream_connected(&self, time: Duration)
[src]
pub fn stream_not_connected(&self, time: Duration, err: &ConnectError)
[src]
pub fn stream_chunk_received(&self, n_bytes: usize)
[src]
pub fn stream_frame_completed(&self, n_bytes: usize, time: Duration)
[src]
pub fn stream_tick_emitted(&self)
[src]
pub fn info_frame_received(
&self,
frame_started_at: Instant,
frame_completed_at: Instant
)
[src]
&self,
frame_started_at: Instant,
frame_completed_at: Instant
)
pub fn keep_alive_frame_received(
&self,
frame_started_at: Instant,
frame_completed_at: Instant
)
[src]
&self,
frame_started_at: Instant,
frame_completed_at: Instant
)
pub fn batch_frame_received(
&self,
frame_started_at: Instant,
frame_completed_at: Instant,
events_bytes: usize
)
[src]
&self,
frame_started_at: Instant,
frame_completed_at: Instant,
events_bytes: usize
)
pub fn batch_frame_gap(&self, gap: Duration)
[src]
pub fn no_frames_warning(&self, no_frames_for: Duration)
[src]
pub fn no_events_warning(&self, no_events_for: Duration)
[src]
pub fn stream_dead(&self, after: Duration)
[src]
pub fn stream_error(&self, err: &EventStreamError)
[src]
pub fn stream_unconsumed_events(&self, n_unconsumed: usize)
[src]
pub fn batches_in_flight_incoming(&self, stats: &EventStreamBatchStats)
[src]
pub fn batches_in_flight_processed(&self, stats: &EventStreamBatchStats)
[src]
pub fn in_flight_stats_reset(&self)
[src]
pub fn event_type_partition_activated(&self)
[src]
pub fn event_type_partition_deactivated(&self, active_for: Duration)
[src]
pub fn batch_processing_started(
&self,
frame_started_at: Instant,
frame_completed_at: Instant
)
[src]
&self,
frame_started_at: Instant,
frame_completed_at: Instant
)
pub fn batch_processed(&self, n_bytes: usize, time: Duration)
[src]
pub fn batch_processed_n_events(&self, n_events: usize)
[src]
pub fn batch_deserialized(&self, n_bytes: usize, time: Duration)
[src]
pub fn cursor_to_commit_received(
&self,
frame_started_at: Instant,
frame_completed_at: Instant
)
[src]
&self,
frame_started_at: Instant,
frame_completed_at: Instant
)
pub fn cursors_commit_triggered(&self, trigger: CommitTrigger)
[src]
pub fn cursor_ages_on_commit_attempt(
&self,
first_cursor_age: Duration,
last_cursor_age: Duration,
first_cursor_age_warning: bool
)
[src]
&self,
first_cursor_age: Duration,
last_cursor_age: Duration,
first_cursor_age_warning: bool
)
pub fn cursors_committed(&self, n_cursors: usize, time: Duration)
[src]
pub fn batches_committed(&self, n_batches: usize, n_events: usize)
[src]
pub fn cursors_not_committed(
&self,
n_cursors: usize,
time: Duration,
err: &CommitError
)
[src]
&self,
n_cursors: usize,
time: Duration,
err: &CommitError
)