How do you use Sentry?
Sentry Saas (sentry.io)
Version
2.47.0
Steps to Reproduce
- Create a consumer that uses Huey 3 and the Sentry Python SDK with default configuration.
- Create a huey group:
task_group = huey.group([one_task, another_task])
- Enqueue the group.
huey.enqueue(task_group)
- Huey integration raises an exception.
File "/app/.venv/lib/python3.13/site-packages/sentry_sdk/integrations/huey.py", line 62, in _sentry_enqueue
name=task.name,
^^^^^^^^^
AttributeError: 'chord' object has no attribute 'name'
- Looking at https://github.com/getsentry/sentry-python/blob/master/sentry_sdk/integrations/huey.py#L60 a span is created which assumes enqueue is called only with tasks, as it expects a
name attribute. This is not true for chord and group.
with sentry_sdk.start_span(
op=OP.QUEUE_SUBMIT_HUEY,
name=task.name,
origin=HueyIntegration.origin,
):
Expected Result
The Huey integration should support group and chord, and not explode. 馃槃 The error in sentry also obscures the fact that the exception is actually inside the sentry sdk, and not in user code.
Actual Result
File "/app/.venv/lib/python3.13/site-packages/sentry_sdk/integrations/huey.py", line 62, in _sentry_enqueue
name=task.name,
^^^^^^^^^
AttributeError: 'chord' object has no attribute 'name'
How do you use Sentry?
Sentry Saas (sentry.io)
Version
2.47.0
Steps to Reproduce
task_group = huey.group([one_task, another_task])huey.enqueue(task_group)nameattribute. This is not true for chord and group.Expected Result
The Huey integration should support group and chord, and not explode. 馃槃 The error in sentry also obscures the fact that the exception is actually inside the sentry sdk, and not in user code.
Actual Result