diff --git a/playbooks/roles/edxapp/defaults/main.yml b/playbooks/roles/edxapp/defaults/main.yml index 3cc1a16a9b6..3221affbb9c 100644 --- a/playbooks/roles/edxapp/defaults/main.yml +++ b/playbooks/roles/edxapp/defaults/main.yml @@ -635,6 +635,7 @@ EDXAPP_NEWRELIC_WORKERS_APPNAME: "{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT EDXAPP_LMS_ENABLE_NEWRELIC_DISTRIBUTED_TRACING: false EDXAPP_CMS_ENABLE_NEWRELIC_DISTRIBUTED_TRACING: false EDXAPP_WORKERS_ENABLE_NEWRELIC_DISTRIBUTED_TRACING: false +EDXAPP_DATADOG_ENABLE: "{{COMMON_ENABLE_DATADOG and COMMON_ENABLE_DATADOG_APP}}" EDXAPP_ORA2_FILE_PREFIX: '{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}/ora2' EDXAPP_FILE_UPLOAD_STORAGE_BUCKET_NAME: '{{ EDXAPP_AWS_STORAGE_BUCKET_NAME }}' diff --git a/playbooks/roles/edxapp/tasks/deploy.yml b/playbooks/roles/edxapp/tasks/deploy.yml index d27bdab0782..9501801e990 100644 --- a/playbooks/roles/edxapp/tasks/deploy.yml +++ b/playbooks/roles/edxapp/tasks/deploy.yml @@ -217,7 +217,7 @@ - install:app-requirements - name: "Install Datadog APM requirements" - when: COMMON_ENABLE_DATADOG and COMMON_ENABLE_DATADOG_APP + when: EDXAPP_DATADOG_ENABLE pip: name: - ddtrace 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 1598a2d8388..03c1da59e8f 100644 --- a/playbooks/roles/edxapp/templates/edx/app/edxapp/cms.sh.j2 +++ b/playbooks/roles/edxapp/templates/edx/app/edxapp/cms.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 %} +{% if EDXAPP_DATADOG_ENABLE %} {% set executable = edxapp_venv_bin + '/ddtrace-run ' + executable %} export DD_TAGS="service:edx-edxapp-cms" export DD_DJANGO_USE_LEGACY_RESOURCE_FORMAT=true 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 4ec43ff52ce..f55f9eec12c 100644 --- a/playbooks/roles/edxapp/templates/edx/app/edxapp/lms.sh.j2 +++ b/playbooks/roles/edxapp/templates/edx/app/edxapp/lms.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 %} +{% if EDXAPP_DATADOG_ENABLE %} {% set executable = edxapp_venv_bin + '/ddtrace-run ' + executable %} export DD_TAGS="service:edx-edxapp-lms" export DD_DJANGO_USE_LEGACY_RESOURCE_FORMAT=true