summaryrefslogtreecommitdiff
path: root/docs/integrations/rq.rst
blob: 5adba36653b2f685873a8baf2226370d333781ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
RQ
==

Starting with RQ version 0.3.1, support for Sentry has been built in.

Usage
-----

RQ natively supports binding with Sentry by passing your ``SENTRY_DSN`` through ``rqworker``::

    $ rqworker --sentry-dsn="___DSN___"


Extended Setup
--------------

If you want to pass additional information, such as ``release``, you'll need to bind your
own instance of the Sentry ``Client``:

.. code-block:: python

    from raven import Client
    from raven.transport.http import HTTPTransport
    from rq.contrib.sentry import register_sentry

    client = Client('___DSN___', transport=HTTPTransport)
    register_sentry(client, worker)

Please see ``rq``'s documentation for more information:
http://python-rq.org/patterns/sentry/