prometheus_exporter
prometheus_exporter copied to clipboard
Add delayed_jobs_ready to DelayedJobs plugin and collect_by_queue option for GoodJob plugin
This PR was born out of metric gathering for our auto-scaling needs as we're migrating hosting platforms and mid-migration of queue libraries.
This PR adds a new metric to the DelayedJobs plugin - "delayed_jobs_ready". This can be thought of as all of the jobs whose run_at < now()
. We needed this metric and not queued or pending since those included all of our jobs which could be days, weeks, or months out.
This PR also adds the ability to view GoodJob metrics sliced by queue, similar to the DelayedJobs plugin. It's fairly self-explanatory why scaling queue workers based off how many jobs are enqueued in a given queue may be beneficial.