@@ -11,8 +11,8 @@ use apollo_monitoring_endpoint::tokio_metrics::{
1111} ;
1212
1313use crate :: dashboard:: { Panel , PanelType , Row , Unit } ;
14+ use crate :: infra_panels:: POD_LEGEND ;
1415use crate :: query_builder:: increase;
15- const TOKIO_PANEL_LEGENDS : & [ & str ] = & [ "{{pod}}" ] ;
1616
1717fn get_panel_tokio_total_busy_duration_micros ( ) -> Panel {
1818 Panel :: new (
@@ -21,7 +21,7 @@ fn get_panel_tokio_total_busy_duration_micros() -> Panel {
2121 increase ( & TOKIO_TOTAL_BUSY_DURATION_MICROS , "1m" ) ,
2222 PanelType :: TimeSeries ,
2323 )
24- . with_legends ( TOKIO_PANEL_LEGENDS . to_vec ( ) )
24+ . with_legends ( POD_LEGEND )
2525 . with_unit ( Unit :: Microseconds )
2626}
2727fn get_panel_tokio_min_busy_duration_micros ( ) -> Panel {
@@ -31,7 +31,7 @@ fn get_panel_tokio_min_busy_duration_micros() -> Panel {
3131 TOKIO_MIN_BUSY_DURATION_MICROS . get_name_with_filter ( ) . to_string ( ) ,
3232 PanelType :: TimeSeries ,
3333 )
34- . with_legends ( TOKIO_PANEL_LEGENDS . to_vec ( ) )
34+ . with_legends ( POD_LEGEND )
3535 . with_unit ( Unit :: Microseconds )
3636}
3737fn get_panel_tokio_max_busy_duration_micros ( ) -> Panel {
@@ -41,29 +41,24 @@ fn get_panel_tokio_max_busy_duration_micros() -> Panel {
4141 TOKIO_MAX_BUSY_DURATION_MICROS . get_name_with_filter ( ) . to_string ( ) ,
4242 PanelType :: TimeSeries ,
4343 )
44- . with_legends ( TOKIO_PANEL_LEGENDS . to_vec ( ) )
44+ . with_legends ( POD_LEGEND )
4545 . with_unit ( Unit :: Microseconds )
4646}
4747
4848fn get_panel_tokio_total_park_count ( ) -> Panel {
49- Panel :: from_gauge ( & TOKIO_TOTAL_PARK_COUNT , PanelType :: TimeSeries )
50- . with_legends ( TOKIO_PANEL_LEGENDS . to_vec ( ) )
49+ Panel :: from_gauge ( & TOKIO_TOTAL_PARK_COUNT , PanelType :: TimeSeries ) . with_legends ( POD_LEGEND )
5150}
5251fn get_panel_tokio_min_park_count ( ) -> Panel {
53- Panel :: from_gauge ( & TOKIO_MIN_PARK_COUNT , PanelType :: TimeSeries )
54- . with_legends ( TOKIO_PANEL_LEGENDS . to_vec ( ) )
52+ Panel :: from_gauge ( & TOKIO_MIN_PARK_COUNT , PanelType :: TimeSeries ) . with_legends ( POD_LEGEND )
5553}
5654fn get_panel_tokio_max_park_count ( ) -> Panel {
57- Panel :: from_gauge ( & TOKIO_MAX_PARK_COUNT , PanelType :: TimeSeries )
58- . with_legends ( TOKIO_PANEL_LEGENDS . to_vec ( ) )
55+ Panel :: from_gauge ( & TOKIO_MAX_PARK_COUNT , PanelType :: TimeSeries ) . with_legends ( POD_LEGEND )
5956}
6057fn get_panel_tokio_global_queue_depth ( ) -> Panel {
61- Panel :: from_gauge ( & TOKIO_GLOBAL_QUEUE_DEPTH , PanelType :: TimeSeries )
62- . with_legends ( TOKIO_PANEL_LEGENDS . to_vec ( ) )
58+ Panel :: from_gauge ( & TOKIO_GLOBAL_QUEUE_DEPTH , PanelType :: TimeSeries ) . with_legends ( POD_LEGEND )
6359}
6460fn get_panel_tokio_workers_count ( ) -> Panel {
65- Panel :: from_gauge ( & TOKIO_WORKERS_COUNT , PanelType :: TimeSeries )
66- . with_legends ( TOKIO_PANEL_LEGENDS . to_vec ( ) )
61+ Panel :: from_gauge ( & TOKIO_WORKERS_COUNT , PanelType :: TimeSeries ) . with_legends ( POD_LEGEND )
6762}
6863
6964pub ( crate ) fn get_tokio_row ( ) -> Row {
0 commit comments