Metrics history
Bullship reads every queue once every 15 seconds and keeps what it reads in history.db in its
data directory, not in your Redis. Nothing needs to change in your workers.
The History tab
Section titled “The History tab”Each queue’s History tab shows, over the last hour, 24 hours, 7 days or 30 days, compared with the period before:
- Throughput: jobs completed and failed.
- Wait time (added to started) and run time (started to finished), p50 and p95.
- The waiting backlog, and the age of the oldest waiting job.
Wait and run times come from a small, even sample of the jobs that finished in each reading, kept as log-scale histograms, so a p95 over any range is within about 7% of the true value.
The Metrics page
Section titled “The Metrics page”The Metrics page compares every queue on a connection over the same ranges: jobs finished, failure rate, wait p95, run p95, run p95 against the range before, and a run time trend. The queue whose run time grew most comes first. Each row opens that queue’s History tab.
How long it’s kept
Section titled “How long it’s kept”BULLSHIP_HISTORY_DAYS=30 # the default; 1 to 90BULLSHIP_HISTORY_DAYS=90 # also adds a 90-day rangeBULLSHIP_HISTORY_DAYS=0 # turns history offMinute rows are kept for two days and rolled up into hours for the rest.
What it costs Redis
Section titled “What it costs Redis”A queue whose BullMQ event stream hasn’t moved since the last reading isn’t read again: one XREAD
asks about 100 queues at once, and the quiet ones keep their last reading. Every queue is still
read in full every 5 minutes, for changes that add no event. A round costs Redis about 2 ms for 40
queues, so a quiet fleet costs few commands on a Redis billed per command.
When counts read low
Section titled “When counts read low”If a queue’s workers have BullMQ metrics off and its removeOnComplete or removeOnFail keep
fewer jobs than finish in a minute, Bullship can only count the jobs Redis still holds, and the
tab says so. Turn on worker metrics for exact counts:
new Worker('email', processor, { connection, metrics: { maxDataPoints: MetricsTime.ONE_WEEK } })