@@ -118,6 +118,8 @@ pub struct SiftStreamMetricsSnapshot {
118118 pub messages_sent_to_backup : u64 ,
119119 /// Total messages dropped for ingestion
120120 pub old_messages_dropped_for_ingestion : u64 ,
121+ /// Total messages dropped for ingestion that failed to be added to backup
122+ pub old_messages_failed_adding_to_backup : u64 ,
121123 /// Current retry attempt count
122124 pub cur_retry_count : u64 ,
123125 /// Depth of the ingestion channel
@@ -382,6 +384,7 @@ pub struct SiftStreamMetrics {
382384 pub ( crate ) bytes_sent : U64Counter ,
383385 pub ( crate ) messages_sent_to_backup : U64Counter ,
384386 pub ( crate ) old_messages_dropped_for_ingestion : U64Counter ,
387+ pub ( crate ) old_messages_failed_adding_to_backup : U64Counter ,
385388 pub ( crate ) cur_retry_count : U64Signal ,
386389 pub ( crate ) ingestion_channel_depth : U64Signal ,
387390 pub ( crate ) backup_channel_depth : U64Signal ,
@@ -407,6 +410,7 @@ impl SiftStreamMetrics {
407410 let bytes_sent = self . bytes_sent . get ( ) ;
408411 let messages_sent_to_backup = self . messages_sent_to_backup . get ( ) ;
409412 let old_messages_dropped_for_ingestion = self . old_messages_dropped_for_ingestion . get ( ) ;
413+ let old_messages_failed_adding_to_backup = self . old_messages_failed_adding_to_backup . get ( ) ;
410414 let cur_retry_count = self . cur_retry_count . get ( ) ;
411415 let ingestion_channel_depth = self . ingestion_channel_depth . get ( ) ;
412416 let backup_channel_depth = self . backup_channel_depth . get ( ) ;
@@ -424,6 +428,7 @@ impl SiftStreamMetrics {
424428 byte_rate : stats. byte_rate ,
425429 messages_sent_to_backup,
426430 old_messages_dropped_for_ingestion,
431+ old_messages_failed_adding_to_backup,
427432 cur_retry_count,
428433 ingestion_channel_depth,
429434 backup_channel_depth,
@@ -497,6 +502,12 @@ impl SiftStreamMetricsSnapshot {
497502 data_type: ChannelDataType :: Uint64 . into( ) ,
498503 ..Default :: default ( )
499504 } ,
505+ ChannelConfig {
506+ name: format!( "{channel_prefix}.old_messages_failed_adding_to_backup" ) ,
507+ description: "Old messages failed to add to backup" . into( ) ,
508+ data_type: ChannelDataType :: Uint64 . into( ) ,
509+ ..Default :: default ( )
510+ } ,
500511 ChannelConfig {
501512 name: format!( "{channel_prefix}.cur_retry_count" ) ,
502513 description: "Current retry count" . into( ) ,
@@ -659,6 +670,10 @@ impl SiftStreamMetricsSnapshot {
659670 & format!( "{channel_prefix}.old_messages_dropped_for_ingestion" ) ,
660671 self . old_messages_dropped_for_ingestion,
661672 ) ,
673+ ChannelValue :: new(
674+ & format!( "{channel_prefix}.old_messages_failed_adding_to_backup" ) ,
675+ self . old_messages_failed_adding_to_backup,
676+ ) ,
662677 ChannelValue :: new(
663678 & format!( "{channel_prefix}.cur_retry_count" ) ,
664679 self . cur_retry_count,
@@ -762,6 +777,7 @@ impl Default for SiftStreamMetrics {
762777 bytes_sent : U64Counter :: default ( ) ,
763778 messages_sent_to_backup : U64Counter :: default ( ) ,
764779 old_messages_dropped_for_ingestion : U64Counter :: default ( ) ,
780+ old_messages_failed_adding_to_backup : U64Counter :: default ( ) ,
765781 cur_retry_count : U64Signal :: default ( ) ,
766782 ingestion_channel_depth : U64Signal :: default ( ) ,
767783 backup_channel_depth : U64Signal :: default ( ) ,
0 commit comments