Skip to content

Conversation

dd-octo-sts[bot]
Copy link
Contributor

@dd-octo-sts dd-octo-sts bot commented Sep 22, 2025

Backport ceded88 from #14649 to 2.21.

Description

Exception Replay introduces an unexpected interaction with Celery when tasks raise custom exceptions with mandatory arguments. It seems that holding on to exception fields, such as cause, for longer than necessary causes Celery to produce bad pickled responses that are not handled by the framework. We therefore proactively clear up our tracking of the exception fields that we want to capture to prevent Celery tasks from crashing the application.

## Description

Exception Replay introduces an unexpected interaction with Celery when
tasks raise custom exceptions with mandatory arguments. It seems that
holding on to exception fields, such as __cause__, for longer than
necessary causes Celery to produce bad pickled responses that are not
handled by the framework. We therefore proactively clear up our tracking
of the exception fields that we want to capture to prevent Celery tasks
from crashing the application.

(cherry picked from commit ceded88)
@dd-octo-sts dd-octo-sts bot requested review from a team as code owners September 22, 2025 13:57
@dd-octo-sts dd-octo-sts bot requested review from ZStriker19 and gnufede September 22, 2025 13:57
Copy link
Contributor

CODEOWNERS have been resolved as:

releasenotes/notes/fix-di-celery-exception-capturing-93e54eb0214ece66.yaml  @DataDog/apm-python
ddtrace/debugging/_signal/utils.py                                      @DataDog/debugger-python

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant