How to get queue size?

Hi everyone,

I would like to know if there is a way to obtain the size of the Temporal queue and assess the overall queue state (I’m aware of the talk here [1]).

I came across some metrics that seem related to the queue, such as “taskqueue_processed,” “taskqueue_deleted,” “taskqueue_outstanding,” and “loaded_task_queue_count.” However, I couldn’t find any documentation explaining how these metrics relate to the actual queue.

Any insights would be appreciated!

Best regards,
Sanel

[1] Is there a way to see what is on the task queues? - #12 by tihomir

Enhanced task queue info was added since the thread you linked to:

Thank you for your fast reply @tihomir :slight_smile: Can I monitor these metrics then [1] or I’ll have to use SDK or RPC? I can’t find them in my Temporal prometheus scrape link, I assume they were added after 1.23? My version is 0.12.0 (server 1.23.0) (ui 2.26.2)

[1] temporal/common/metrics/metric_defs.go at c8b91e1317b08500f3cae01357f2fc936d2b3d2e · temporalio/temporal · GitHub

Quick update: after updating Temporal server to 1.25.2, I see approximate_* metrics on the scrape endpoint. Thank you @tihomir!