From f866545bb9a48ffe4e5ef0402fdc9819c4ed6f0c Mon Sep 17 00:00:00 2001 From: connorhaugh <49422820+connorhaugh@users.noreply.github.com> Date: Thu, 18 Apr 2024 13:08:25 -0400 Subject: [PATCH] temp: trace celery tasks in dd (#34537) --- 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 855970c1df3e..5536b4952316 100644 --- a/openedx/core/lib/celery/__init__.py +++ b/openedx/core/lib/celery/__init__.py @@ -19,6 +19,15 @@ from celery import Celery +# TEMP: This code will be removed by ARCH-BOM on 4/22/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')