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

Make the Agents Metrics Accurate Again #4060

Closed
wants to merge 9 commits into from
Closed

Make the Agents Metrics Accurate Again #4060

wants to merge 9 commits into from

Conversation

Cliftonz
Copy link
Contributor

What change does this PR introduce?

This pr corrects the times and granularity for metrics with bullmq.
Why was this change needed?

This pr will allow use to accurately autoscale our workers by sending the historical job processing data to a 3rd party New relic.

const delayedCount = await queueService.bullMqService.queue.getDelayedCount();
const activeCount = await queueService.bullMqService.queue.getActiveCount();

if (process.env.NOVU_MANAGED_SERVICE === 'true' && process.env.NEW_RELIC_LICENSE_KEY) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we move the condition to this service construction and avoid to instantiate anything for our self hosted users?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure, you will need to let me know what is the best way to do this.
My thought is that for OS it will output to the cli so if they wanted to they can scrape this data for themselfs.

apps/worker/src/app/shared/utils/cron-health.ts Outdated Show resolved Hide resolved
@p-fernandez
Copy link
Contributor

Moving to this PR: #4099

@p-fernandez p-fernandez closed this Sep 5, 2023
@rifont rifont deleted the q-metric-2 branch November 7, 2024 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants