@@ -29,6 +29,7 @@ pub const DIRECTION_LABEL: &str = "event";
2929
3030pub ( crate ) const READ : Direction = Direction :: Read ;
3131pub ( crate ) const WRITE : Direction = Direction :: Write ;
32+ #[ allow( dead_code) ]
3233pub ( crate ) const ASN_LABEL : & str = "asn" ;
3334
3435/// Label value for [`DIRECTION_LABEL`] for `read` events
@@ -523,88 +524,88 @@ pub(crate) fn processing_time(direction: Direction) -> Histogram {
523524 PROCESSING_TIME . with_label_values ( & [ direction. label ( ) ] )
524525}
525526
526- pub ( crate ) fn bytes_total ( direction : Direction , asn : & AsnInfo < ' _ > ) -> IntCounter {
527+ pub ( crate ) fn bytes_total ( direction : Direction , _asn : & AsnInfo < ' _ > ) -> IntCounter {
527528 static BYTES_TOTAL : Lazy < IntCounterVec > = Lazy :: new ( || {
528529 prometheus:: register_int_counter_vec_with_registry! {
529530 prometheus:: opts! {
530531 "bytes_total" ,
531532 "total number of bytes" ,
532533 } ,
533- & [ Direction :: LABEL , ASN_LABEL ] ,
534+ & [ Direction :: LABEL ] ,
534535 registry( ) ,
535536 }
536537 . unwrap ( )
537538 } ) ;
538539
539- BYTES_TOTAL . with_label_values ( & [ direction. label ( ) , asn . asn ] )
540+ BYTES_TOTAL . with_label_values ( & [ direction. label ( ) ] )
540541}
541542
542- pub ( crate ) fn errors_total ( direction : Direction , display : & str , asn : & AsnInfo < ' _ > ) -> IntCounter {
543+ pub ( crate ) fn errors_total ( direction : Direction , display : & str , _asn : & AsnInfo < ' _ > ) -> IntCounter {
543544 static ERRORS_TOTAL : Lazy < IntCounterVec > = Lazy :: new ( || {
544545 prometheus:: register_int_counter_vec_with_registry! {
545546 prometheus:: opts! {
546547 "errors_total" ,
547548 "total number of errors sending packets" ,
548549 } ,
549- & [ Direction :: LABEL , "display" , ASN_LABEL ] ,
550+ & [ Direction :: LABEL , "display" ] ,
550551 registry( ) ,
551552 }
552553 . unwrap ( )
553554 } ) ;
554555
555- ERRORS_TOTAL . with_label_values ( & [ direction. label ( ) , display, asn . asn ] )
556+ ERRORS_TOTAL . with_label_values ( & [ direction. label ( ) , display] )
556557}
557558
558- pub ( crate ) fn packet_jitter ( direction : Direction , asn : & AsnInfo < ' _ > ) -> IntGauge {
559+ pub ( crate ) fn packet_jitter ( direction : Direction , _asn : & AsnInfo < ' _ > ) -> IntGauge {
559560 static PACKET_JITTER : Lazy < IntGaugeVec > = Lazy :: new ( || {
560561 prometheus:: register_int_gauge_vec_with_registry! {
561562 prometheus:: opts! {
562563 "packet_jitter" ,
563564 "The time between new packets" ,
564565 } ,
565- & [ Direction :: LABEL , ASN_LABEL ] ,
566+ & [ Direction :: LABEL ] ,
566567 registry( ) ,
567568 }
568569 . unwrap ( )
569570 } ) ;
570571
571- PACKET_JITTER . with_label_values ( & [ direction. label ( ) , asn . asn ] )
572+ PACKET_JITTER . with_label_values ( & [ direction. label ( ) ] )
572573}
573574
574- pub ( crate ) fn packets_total ( direction : Direction , asn : & AsnInfo < ' _ > ) -> IntCounter {
575+ pub ( crate ) fn packets_total ( direction : Direction , _asn : & AsnInfo < ' _ > ) -> IntCounter {
575576 static PACKETS_TOTAL : Lazy < IntCounterVec > = Lazy :: new ( || {
576577 prometheus:: register_int_counter_vec_with_registry! {
577578 prometheus:: opts! {
578579 "packets_total" ,
579580 "Total number of packets" ,
580581 } ,
581- & [ Direction :: LABEL , ASN_LABEL ] ,
582+ & [ Direction :: LABEL ] ,
582583 registry( ) ,
583584 }
584585 . unwrap ( )
585586 } ) ;
586587
587- PACKETS_TOTAL . with_label_values ( & [ direction. label ( ) , asn . asn ] )
588+ PACKETS_TOTAL . with_label_values ( & [ direction. label ( ) ] )
588589}
589590
590591pub ( crate ) fn packets_dropped_total (
591592 direction : Direction ,
592593 source : & str ,
593- asn : & AsnInfo < ' _ > ,
594+ _asn : & AsnInfo < ' _ > ,
594595) -> IntCounter {
595596 static PACKETS_DROPPED : Lazy < IntCounterVec > = Lazy :: new ( || {
596597 prometheus:: register_int_counter_vec_with_registry! {
597598 prometheus:: opts! {
598599 "packets_dropped_total" ,
599600 "Total number of dropped packets" ,
600601 } ,
601- & [ Direction :: LABEL , "source" , ASN_LABEL ] ,
602+ & [ Direction :: LABEL , "source" ] ,
602603 registry( ) ,
603604 }
604605 . unwrap ( )
605606 } ) ;
606607
607- PACKETS_DROPPED . with_label_values ( & [ direction. label ( ) , source, asn . asn ] )
608+ PACKETS_DROPPED . with_label_values ( & [ direction. label ( ) , source] )
608609}
609610
610611pub ( crate ) fn provider_task_failures_total ( provider_task : & str ) -> IntCounter {
0 commit comments