Docs / Concepts
Metrics and monitoring
With metrics.listen set, every worker serves Prometheus metrics. The ones worth an alert are:
| Metric | What it tells |
|---|---|
badger_queue_depth | Jobs waiting, per queue |
badger_queue_latency_seconds | How long the oldest waiting job has waited |
badger_jobs_failed_total | Jobs that used up their attempts |
badger_jobs_duration_seconds | How long jobs take, as a histogram |
A latency that keeps growing means the workers cannot keep up; add workers or raise concurrency.
Cleaning up
Done jobs are deleted after seven days by the workers themselves, a few thousand at a time, so the table stays small without a cron job of yours.