← All platforms

Dramatiq error tracking

An actor has work to do. If it fails, keep more than a line in the worker log. The Sentry Dramatiq integration sends its error report to your Telebugs server.

~/hoofnotes  pip install sentry-sdk
~/hoofnotes  nvim tasks.py
import sentry_sdk
from sentry_sdk.integrations.dramatiq import DramatiqIntegration
sentry_sdk.init(
# Copy the complete Telebugs DSN, key and path included.
dsn="YOUR_TELEBUGS_DSN",
integrations=[DramatiqIntegration()],
)
from hoofnotes.actors import sync_notes
~/hoofnotes  dramatiq tasks

Space pauses or resumes. R replays. Escape shows the complete setup.

Hang on, I already use Sentry

Keep sentry-sdk and change its destination to your Telebugs DSN. Your error reports stay on your server. You don’t need a Sentry account.

Does this report errors from actors?

Yes. The Dramatiq integration reports exceptions raised while processing messages. You get the Python backtrace even though the work happened outside a web request.

Does this change how retries work?

No. Dramatiq remains in charge of running and retrying your messages. Telebugs gives you a place to investigate the error reports the SDK sends.