vector/internal_events/
aws_kinesis.rs1use metrics::counter;
3use vector_lib::internal_event::{
4 ComponentEventsDropped, InternalEvent, UNINTENTIONAL, error_stage, error_type,
5};
6
7#[derive(Debug)]
8pub struct AwsKinesisStreamNoPartitionKeyError<'a> {
9 pub partition_key_field: &'a str,
10}
11
12impl InternalEvent for AwsKinesisStreamNoPartitionKeyError<'_> {
13 fn emit(self) {
14 let reason = "Partition key does not exist.";
15
16 error!(
17 message = reason,
18 partition_key_field = %self.partition_key_field,
19 error_type = error_type::PARSER_FAILED,
20 stage = error_stage::PROCESSING,
21 internal_log_rate_limit = true,
22 );
23
24 counter!(
25 "component_errors_total",
26 "error_type" => error_type::PARSER_FAILED,
27 "stage" => error_stage::PROCESSING,
28 )
29 .increment(1);
30
31 emit!(ComponentEventsDropped::<UNINTENTIONAL> { count: 1, reason });
32 }
33}