Sentry is a popular exception gathering service. RQ allows you to very easily send job exceptions to Sentry. To do this, you’ll need to have sentry-sdk installed.
There are a few ways to start sending job exceptions to Sentry.
Simply invoke the rqworker
script using the --sentry-dsn
argument.
rq worker --sentry-dsn https://my-dsn@sentry.io/123
Declare SENTRY_DSN
in RQ’s config file like this:
SENTRY_DSN = 'https://my-dsn@sentry.io/123'
And run RQ’s worker with your config file:
rq worker -c my_settings
Visit this page to read more about running RQ using a config file.
Simple set RQ_SENTRY_DSN
in your environment variable and RQ will
automatically start Sentry integration for you.
RQ_SENTRY_DSN="https://my-dsn@sentry.io/123" rq worker