File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 5454 subsystem = PROMETHEUS_SUMMARIES_SUBSYSTEM ,
5555)
5656
57+ SUMMARY_QUEUE_SIZE_BY_PROCESSOR_METRIC = Gauge (
58+ 'summary_queue_size_by_processor' ,
59+ documentation = 'Number of jobs in the queue per processor' ,
60+ namespace = PROMETHEUS_NAMESPACE ,
61+ subsystem = PROMETHEUS_SUMMARIES_SUBSYSTEM ,
62+ labelnames = ['processor' ],
63+ )
64+
5765SUMMARY_ERROR_COUNTER = Counter (
5866 'summary_errors' ,
5967 documentation = 'Number of jobs that have failed' ,
Original file line number Diff line number Diff line change 3333 SUMMARY_ERROR_COUNTER ,
3434 SUMMARY_FULL_DURATION_METRIC ,
3535 SUMMARY_INPUT_LENGTH_METRIC ,
36+ SUMMARY_QUEUE_SIZE_BY_PROCESSOR_METRIC ,
3637 SUMMARY_QUEUE_SIZE_METRIC ,
3738 SUMMARY_TIME_IN_QUEUE_METRIC ,
3839)
@@ -117,6 +118,9 @@ async def update_summary_queue_metric() -> None:
117118 processor_queue_size = await db .llen (pending_key )
118119 total_queue_size += processor_queue_size
119120
121+ # Set individual processor queue size metric
122+ SUMMARY_QUEUE_SIZE_BY_PROCESSOR_METRIC .labels (processor = processor .value ).set (processor_queue_size )
123+
120124 SUMMARY_QUEUE_SIZE_METRIC .set (total_queue_size )
121125
122126
You can’t perform that action at this time.
0 commit comments