felixmosh / bull-board

🎯 Queue background jobs inspector

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature: Metrics support

alko89 opened this issue · comments

Bull and BullMQ support metrics, which can be enabled with metrics option:

// Bull
new Queue3(
  queueName, 
  {
    metrics: {
      maxDataPoints: MetricsTime.ONE_WEEK 
    }
  }
);

// BullMQ (in worker)
new Worker(
  queueName,
  async (job) => { ... },
  {
    metrics: {
      maxDataPoints: MetricsTime.ONE_WEEK,
    },
  }
);

This enables additional data in Redis, which can be fetched by using getMetrics method and provides information about job completion/failure over time with some additional metadata:

interface Metrics {
    meta: {
        count: number;
        prevTS: number;
        prevCount: number;
    };
    data: number[];
    count: number;
}

This would allow displaying a graph of completed and failed jobs over time, it should also provide information about job response time, process time and throughput.

image

Relates to #258

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.