From ebe36a295732f22579d3dcb3190810e4232de61b Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Mon, 22 Apr 2024 11:05:50 -0400 Subject: [PATCH] Revert "Revert "temp: trace celery tasks in dd"" (#34563) * Revert "Revert "temp: trace celery tasks in dd (#34537)" (#34553)" This reverts commit a7b441690d33574200d96ed3244ca280c1c00f05. * docs: Update removal date on temporary celery flag. --- openedx/core/lib/celery/__init__.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/openedx/core/lib/celery/__init__.py b/openedx/core/lib/celery/__init__.py index 855970c1df..e9925fca83 100644 --- a/openedx/core/lib/celery/__init__.py +++ b/openedx/core/lib/celery/__init__.py @@ -19,6 +19,15 @@ over older code, and there is probably a better mechanism to be had.) from celery import Celery +# TEMP: This code will be removed by ARCH-BOM on 4/23/24 +# ddtrace allows celery task logs to be traced by the dd agent. +# TODO: remove this code. +try: + from ddtrace import patch + patch(celery=True) +except ImportError: + pass + # WARNING: Do not refer to this unless you are cms.celery or # lms.celery. See module docstring! APP = Celery('proj')