From e1c9f6f5a6f3e0f6dc84415bf68a48c5495a39c1 Mon Sep 17 00:00:00 2001 From: Tim McCormack Date: Thu, 8 Aug 2024 12:13:51 +0000 Subject: [PATCH] feat: Restore Datadog tracing of pymongo (#59) ddtrace 2.7.9 and 2.8.2 were released with a fix for this issue, and we've since upgraded past these. See https://github.com/edx/edx-arch-experiments/issues/580 --- playbooks/roles/edxapp/tasks/deploy.yml | 4 +++- playbooks/roles/edxapp/templates/edx/app/edxapp/cms.sh.j2 | 2 -- playbooks/roles/edxapp/templates/edx/app/edxapp/lms.sh.j2 | 2 -- playbooks/roles/edxapp/templates/edx/app/edxapp/worker.sh.j2 | 2 -- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/playbooks/roles/edxapp/tasks/deploy.yml b/playbooks/roles/edxapp/tasks/deploy.yml index c5836a230b7..5c66251b222 100644 --- a/playbooks/roles/edxapp/tasks/deploy.yml +++ b/playbooks/roles/edxapp/tasks/deploy.yml @@ -220,7 +220,9 @@ when: EDXAPP_DATADOG_ENABLE pip: name: - - ddtrace + # ddtrace 2.7.9 contains a fix for a pymongo incompatibility. + # (Same fix is present in 2.8.2 on the 2.8.x release line.) + - 'ddtrace>=2.7.9' extra_args: "--exists-action w {{ item.extra_args|default('') }}" virtualenv: "{{ edxapp_venv_dir }}" state: present diff --git a/playbooks/roles/edxapp/templates/edx/app/edxapp/cms.sh.j2 b/playbooks/roles/edxapp/templates/edx/app/edxapp/cms.sh.j2 index e5311bb07ba..4c6d9822e5b 100644 --- a/playbooks/roles/edxapp/templates/edx/app/edxapp/cms.sh.j2 +++ b/playbooks/roles/edxapp/templates/edx/app/edxapp/cms.sh.j2 @@ -28,8 +28,6 @@ export DD_DJANGO_USE_HANDLER_RESOURCE_FORMAT=true # trace debug logging issue doesn't actually affect edxapp for some # reason. export DD_TRACE_LOG_STREAM_HANDLER=false -# Datadog's instrumentation breaks pymongo: https://github.com/edx/edx-arch-experiments/issues/580 -export DD_TRACE_PYMONGO_ENABLED=false # Temporary: Include span tags representing a variety of tracing HTTP headers. # This might help us (or DD support) identify an interaction with incoming trace diff --git a/playbooks/roles/edxapp/templates/edx/app/edxapp/lms.sh.j2 b/playbooks/roles/edxapp/templates/edx/app/edxapp/lms.sh.j2 index 7c9f400e516..053bf22923c 100644 --- a/playbooks/roles/edxapp/templates/edx/app/edxapp/lms.sh.j2 +++ b/playbooks/roles/edxapp/templates/edx/app/edxapp/lms.sh.j2 @@ -29,8 +29,6 @@ export DD_DJANGO_USE_HANDLER_RESOURCE_FORMAT=true # trace debug logging issue doesn't actually affect edxapp for some # reason. export DD_TRACE_LOG_STREAM_HANDLER=false -# Datadog's instrumentation breaks pymongo: https://github.com/edx/edx-arch-experiments/issues/580 -export DD_TRACE_PYMONGO_ENABLED=false # Temporary: Include span tags representing a variety of tracing HTTP headers. # This might help us (or DD support) identify an interaction with incoming trace diff --git a/playbooks/roles/edxapp/templates/edx/app/edxapp/worker.sh.j2 b/playbooks/roles/edxapp/templates/edx/app/edxapp/worker.sh.j2 index bdb13683e3c..ab2d85c9115 100644 --- a/playbooks/roles/edxapp/templates/edx/app/edxapp/worker.sh.j2 +++ b/playbooks/roles/edxapp/templates/edx/app/edxapp/worker.sh.j2 @@ -24,8 +24,6 @@ export DD_DJANGO_USE_LEGACY_RESOURCE_FORMAT=true # trace debug logging issue doesn't actually affect edxapp for some # reason. export DD_TRACE_LOG_STREAM_HANDLER=false -# Datadog's instrumentation breaks pymongo: https://github.com/edx/edx-arch-experiments/issues/580 -export DD_TRACE_PYMONGO_ENABLED=false # Temporary: Include span tags representing a variety of tracing HTTP headers. # This might help us (or DD support) identify an interaction with incoming trace