Metrics
- Why do the queue methods need to be separate instead of being parameters on the other methods?
Consolidating would make the query building significantly more complicated. Specifically around the group by logic. Also, consider the common case where we want the number of enqueued and running tasks, across all queues, it means that we'd not pass a specific queue name but we'd want queue_name is not null.
- What graphs to we intend to build with these metrics?
- Display current status counts
- Display current queue length / running tasks on a queue
- Display completion rate for queues or for a specific queue.
I am removing rates because they are too complicated. One thing tho is that to compute rate on the observability backend, we'd need to export/expose monotonically increasing counters (what we export are gauges). We don't have the infrastructure to compute them from the database only right now.