discourse / prometheus_exporter

A framework for collecting and aggregating prometheus metrics
MIT License
532 stars 154 forks source link

DelayedJob gauges are queue counts but labelled with job names #180

Closed jferris closed 3 years ago

jferris commented 3 years ago

The gauge metrics for DelayedJob (jobs pending, jobs enqueued) are counted for all jobs in a queue, but are labelled with the job name. This causes a gauge to be created for each job, but the gauge is only updated when that particular job runs. This means it isn't possible to query Prometheus to determine the actual number of jobs pending or enqueued, because you can't tell which gauge was most recently updated.