I would like to connect sentry monitoring to my kue app. How should it be done? I see in docs how to do it for plain node.js:
var client = new raven.Client(...);
client.captureError(new Error('Uh oh!!'));
But I would like to have the express style:
app.use(raven.middleware.express(...));
So that sentry will catch errors for me, instead of calling client.captureError manually. Maybe it is simple, I am using kue for the first time, will appreciate any help.
Thanks.
You cannot use the express style middleware for catching kue errors because errors that occur via a kue job do not get passed through your express app.
Like you mentioned you could call client.captureError when handling a specific job.
If you want to catch all errors from queue you could register an error handler that can call captureError
You could also capture other events from kue such as when a job fails