From 16961e2bd4747971edc7f63ad0656f58e99fae98 Mon Sep 17 00:00:00 2001 From: connorhaugh <49422820+connorhaugh@users.noreply.github.com> Date: Wed, 17 Apr 2024 15:46:53 -0400 Subject: [PATCH 1/3] temp: add dd trace to celery --- enterprise_catalog/celery.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/enterprise_catalog/celery.py b/enterprise_catalog/celery.py index 4d4af9ab1..0ac97ff5f 100644 --- a/enterprise_catalog/celery.py +++ b/enterprise_catalog/celery.py @@ -3,6 +3,14 @@ """ 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('enterprise_catalog', ) From 4b59b51483e8ae178c9ee78ecf3dd4c21d267c34 Mon Sep 17 00:00:00 2001 From: connorhaugh <49422820+connorhaugh@users.noreply.github.com> Date: Thu, 18 Apr 2024 08:32:25 -0400 Subject: [PATCH 2/3] fix: pycodestyle --- enterprise_catalog/celery.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/enterprise_catalog/celery.py b/enterprise_catalog/celery.py index 0ac97ff5f..3adbaf392 100644 --- a/enterprise_catalog/celery.py +++ b/enterprise_catalog/celery.py @@ -8,9 +8,12 @@ # TODO: remove this code. try: from ddtrace import patch - patch(celery=True) except ImportError: pass +try: + patch(celery=True) +except NameError: + pass app = Celery('enterprise_catalog', ) From 7ea84998cbfe787e4dcc9802a1239e2656749d86 Mon Sep 17 00:00:00 2001 From: connorhaugh <49422820+connorhaugh@users.noreply.github.com> Date: Fri, 19 Apr 2024 10:24:54 -0400 Subject: [PATCH 3/3] fix: spacing --- enterprise_catalog/celery.py | 1 + 1 file changed, 1 insertion(+) diff --git a/enterprise_catalog/celery.py b/enterprise_catalog/celery.py index 3adbaf392..a5759f328 100644 --- a/enterprise_catalog/celery.py +++ b/enterprise_catalog/celery.py @@ -3,6 +3,7 @@ """ 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.