def METHOD_NAME(sender, task_id, exception, args, kwargs, traceback, einfo, **kw):
    client.capture_exception(
        extra={"task_id": task_id, "task": sender, "args": args, "kwargs": kwargs}, handled=False
    )