Temporal metric for task queue size/backlog, or schedule to start latency for task queue

I’m trying to understand which metric I can look at to understand the “backlog size” of a given task queue. I found Get the count of currently active workflows and activities - #3 by Michael_Mole, though this post was discussing how to retrieve this count programmatically, which I’m not interested in - simply the metric.

If that’s not supported, looking at the scheduled_to_start latency metric is also acceptable to understand how “behind” we are for a given queue. I can see this is defined as “task_schedule_to_start_latency” from the Metrics defs.go. However, I’m having trouble finding this for a given queue. Here’s what I can see today, by doing a search in DataDog:

None of these metrics appear to contain values related to our specific workflows or task queues. Is there a different metric that allows us to understand schedule-to-start for a given task queue?

Schedule to start is a client-side metric. You have to enable it on the client. See this Go sample that sets up Prometheus metrics scope in the worker. Let us know if that helps.

Thank you, this was successful. We are using the Java SDK so we followed the discussion in this thread: How to enable Metrics Support using JAVA SDK

Glad to hear! We are also adding similar sdk metrics sample for java sdk, see pr here.