--- title: "RQ: Sending exceptions to Sentry" layout: patterns --- ## Sending exceptions to Sentry [Sentry](https://www.getsentry.com/) is a popular exception gathering service that RQ supports integrating with since version 0.3.1, through its custom exception handlers. RQ includes a convenience function that registers your existing Sentry client to send all exceptions to. An example: {% highlight python %} from raven import Client from raven.transport.http import HTTPTransport from rq.contrib.sentry import register_sentry client = Client('', transport=HTTPTransport) register_sentry(client, worker) {% endhighlight %} Where `worker` is your RQ worker instance. After that, call `worker.work(...)` to start the worker. All exceptions that occur are reported to Sentry automatically.
Note:

Error delivery to Sentry is known to be unreliable with RQ when using async transports (the default is). So you are encouraged to use the HTTPTransport or RequestsHTTPTransport when creating your client. See the code sample above, or the Raven documentation.

For more info, see the Raven docs.

Read more on RQ's [custom exception handling](/docs/exceptions/) capabilities.