Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Metrics support #618

Open
alko89 opened this issue Aug 14, 2023 · 1 comment
Open

Feature: Metrics support #618

alko89 opened this issue Aug 14, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@alko89
Copy link

alko89 commented Aug 14, 2023

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

Copy link

stale bot commented Nov 12, 2023

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.

@stale stale bot added the wontfix This will not be worked on label Nov 12, 2023
@felixmosh felixmosh added enhancement New feature or request and removed wontfix This will not be worked on labels Nov 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants