From 14992ba0f6862d591fe24616f598efd7763217fd Mon Sep 17 00:00:00 2001 From: connorhaugh <49422820+connorhaugh@users.noreply.github.com> Date: Tue, 23 Apr 2024 09:51:36 -0400 Subject: [PATCH] temp: add dd trace to celery (#612) * temp: add dd trace to celery * feat: lint --- registrar/celery.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/registrar/celery.py b/registrar/celery.py index a33f0ce64..650e922f6 100644 --- a/registrar/celery.py +++ b/registrar/celery.py @@ -5,6 +5,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 + app = Celery('registrar') app.conf.task_protocol = 1