diff --git a/playbooks/roles/edx_django_service/tasks/main.yml b/playbooks/roles/edx_django_service/tasks/main.yml index 5b984f1c9ad..18c3cfd1925 100644 --- a/playbooks/roles/edx_django_service/tasks/main.yml +++ b/playbooks/roles/edx_django_service/tasks/main.yml @@ -213,9 +213,7 @@ - install:app-requirements - name: "Install Datadog APM requirements" - when: > - COMMON_ENABLE_DATADOG and - (COMMON_ENABLE_DATADOG_APP or edx_django_service_datadog_enable) + when: edx_django_service_datadog_enable pip: name: - ddtrace diff --git a/playbooks/roles/edx_django_service/templates/edx/app/app/app.sh.j2 b/playbooks/roles/edx_django_service/templates/edx/app/app/app.sh.j2 index 22fd3802776..342386eede7 100644 --- a/playbooks/roles/edx_django_service/templates/edx/app/app/app.sh.j2 +++ b/playbooks/roles/edx_django_service/templates/edx/app/app/app.sh.j2 @@ -20,7 +20,7 @@ fi export NEW_RELIC_LICENSE_KEY="{{ NEWRELIC_LICENSE_KEY }}" {% endif -%} -{% if COMMON_ENABLE_DATADOG and (COMMON_ENABLE_DATADOG_APP or edx_django_service_datadog_enable) %} +{% if edx_django_service_datadog_enable %} {% set executable = edx_django_service_venv_bin + '/ddtrace-run ' + executable %} export DD_TAGS="service:{{ edx_django_datadog_service }}" export DD_DJANGO_USE_HANDLER_RESOURCE_FORMAT=true