feat: introduce Sentry

This commit is contained in:
Ali BARIN
2023-03-10 18:53:10 +00:00
parent 2c18667ffd
commit 4d90df9d9a
19 changed files with 197 additions and 13 deletions

View File

@@ -1,4 +1,6 @@
import { Worker } from 'bullmq';
import * as Sentry from '../helpers/sentry.ee';
import redisConfig from '../config/redis';
import logger from '../helpers/logger';
import triggerQueue from '../queues/trigger';
@@ -65,6 +67,12 @@ worker.on('failed', (job, err) => {
logger.info(
`JOB ID: ${job.id} - FLOW ID: ${job.data.flowId} has failed to start with ${err.message}`
);
Sentry.captureException(err, {
extra: {
jobId: job.id,
}
});
});
process.on('SIGTERM', async () => {