Install the sentry Python SDK:
pip install sentry-sdk
Initialize the SDK in your worker configuration:
# mysettings.py
import sentry_sdk
sentry_sdk.init(
dsn="YOUR_DSN",
traces_sample_rate=0.01,
auto_session_tracking=False,
)
Start your RQ worker:
rq worker -c mysettings
The SDK auto-detects RQ (Redis Queue) and captures failed job exceptions.