File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -653,6 +653,17 @@ impl ModuleHost {
653653 . reducer_wait_time
654654 . with_label_values ( & self . info . database_identity , reducer)
655655 . start_timer ( ) ;
656+ let queue_length_gauge = WORKER_METRICS
657+ . instance_queue_length
658+ . with_label_values ( & self . info . database_identity ) ;
659+ queue_length_gauge. inc ( ) ;
660+ {
661+ let queue_length = queue_length_gauge. get ( ) ;
662+ WORKER_METRICS
663+ . instance_queue_length_histogram
664+ . with_label_values ( & self . info . database_identity )
665+ . observe ( queue_length as f64 ) ;
666+ }
656667
657668 // Operations on module instances (e.g. calling reducers) is blocking,
658669 // partially because the computation can potentialyl take a long time
@@ -671,6 +682,7 @@ impl ModuleHost {
671682 . job_tx
672683 . run ( move |inst| {
673684 queue_timer. stop_and_record ( ) ;
685+ queue_length_gauge. dec ( ) ;
674686 f ( inst)
675687 } )
676688 . await ;
You can’t perform that action at this time.
0 commit comments