To get rq workers talking to opbeat at this current time, you must use a custom rq exception handler and add it to the chain that the worker accepts. This allows us to call opbeat synchronously and avoid the current issues with the opbeat library's async workers.
Both of the examples below keep the original rq exception handler functionality of moving a failed job to the failed queue, but this is optional - if you only want opbeat logging then just don't pass the move_to_failed_queue
handler.
Note that we send a lot of extra information about the job itself (see _get_job_details
) but this is not a requirement, the stack you get is useful enough without it.