pub struct ProcessingEvent {
pub timestamp: SystemTime,
pub shard_id: String,
pub event_type: ProcessingEventType,
}
Expand description
Represents a monitoring event from the Kinesis processor
Fields§
§timestamp: SystemTime
When the event occurred
shard_id: String
ID of the shard this event relates to
event_type: ProcessingEventType
The type of event and its details
Implementations§
source§impl ProcessingEvent
impl ProcessingEvent
pub fn batch_complete( shard_id: String, successful_count: usize, failed_count: usize, duration: Duration, ) -> Self
pub fn batch_start(shard_id: String) -> Self
pub fn batch_metrics(shard_id: String, metrics: BatchMetrics) -> Self
pub fn batch_error(shard_id: String, error: String, duration: Duration) -> Self
pub fn record_success( shard_id: String, sequence_number: String, checkpoint_success: bool, ) -> Self
pub fn record_failure( shard_id: String, sequence_number: String, error: String, ) -> Self
pub fn checkpoint_failure( shard_id: String, sequence_number: String, error: String, ) -> Self
sourcepub fn record_attempt(
shard_id: String,
sequence_number: String,
success: bool,
attempt_number: u32,
duration: Duration,
error: Option<String>,
is_final_attempt: bool,
) -> Self
pub fn record_attempt( shard_id: String, sequence_number: String, success: bool, attempt_number: u32, duration: Duration, error: Option<String>, is_final_attempt: bool, ) -> Self
Create a new record processing event
sourcepub fn shard_event(
shard_id: String,
event_type: ShardEventType,
details: Option<String>,
) -> Self
pub fn shard_event( shard_id: String, event_type: ShardEventType, details: Option<String>, ) -> Self
Create a new shard event
Trait Implementations§
source§impl Clone for ProcessingEvent
impl Clone for ProcessingEvent
source§fn clone(&self) -> ProcessingEvent
fn clone(&self) -> ProcessingEvent
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ProcessingEvent
impl RefUnwindSafe for ProcessingEvent
impl Send for ProcessingEvent
impl Sync for ProcessingEvent
impl Unpin for ProcessingEvent
impl UnwindSafe for ProcessingEvent
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.