From acfb8b847a002f7ec291786ede09fbbbb4e79f27 Mon Sep 17 00:00:00 2001 From: Chris Pappas Date: Wed, 26 Jun 2024 15:22:01 -0400 Subject: [PATCH] =?UTF-8?q?feat:=20decouple=20ecomworker=20NR=20installati?= =?UTF-8?q?on=20from=20COMMON=5FENABLE=5FNEWRELIC=E2=80=A6=20(#53)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: decouple ecomworker NR installation from COMMON_ENABLE_NEWRELIC_APP * chore: Update playbooks/roles/ecomworker/defaults/main.yml Co-authored-by: Tim McCormack --------- Co-authored-by: Tim McCormack --- playbooks/roles/ecomworker/defaults/main.yml | 1 + .../ecomworker/templates/edx/app/ecomworker/ecomworker.sh.j2 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/playbooks/roles/ecomworker/defaults/main.yml b/playbooks/roles/ecomworker/defaults/main.yml index d5643c0b46e..88ca4071e5b 100644 --- a/playbooks/roles/ecomworker/defaults/main.yml +++ b/playbooks/roles/ecomworker/defaults/main.yml @@ -26,6 +26,7 @@ ECOMMERCE_WORKER_REPOS: # Requires that New Relic be enabled via COMMON_ENABLE_NEWRELIC, and that # a key be provided via NEWRELIC_LICENSE_KEY. ECOMMERCE_WORKER_NEWRELIC_APPNAME: '{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}-{{ ecommerce_worker_service_name }}' +ECOMMERCE_WORKER_ENABLE_NEWRELIC_APP: '{{ COMMON_ENABLE_NEWRELIC_APP }}' ECOMMERCE_WORKER_ENABLE_NEWRELIC_DISTRIBUTED_TRACING: false # Datadog diff --git a/playbooks/roles/ecomworker/templates/edx/app/ecomworker/ecomworker.sh.j2 b/playbooks/roles/ecomworker/templates/edx/app/ecomworker/ecomworker.sh.j2 index fdb1f55762b..bfeea9c5496 100644 --- a/playbooks/roles/ecomworker/templates/edx/app/ecomworker/ecomworker.sh.j2 +++ b/playbooks/roles/ecomworker/templates/edx/app/ecomworker/ecomworker.sh.j2 @@ -6,7 +6,7 @@ {% set executable = ecommerce_worker_venv_bin + '/celery' %} -{% if COMMON_ENABLE_NEWRELIC_APP %} +{% if ECOMMERCE_WORKER_ENABLE_NEWRELIC_APP %} {% set executable = ecommerce_worker_venv_bin + '/newrelic-admin run-program ' + ecommerce_worker_venv_bin + '/celery' %} export NEW_RELIC_DISTRIBUTED_TRACING_ENABLED='{{ ECOMMERCE_WORKER_ENABLE_NEWRELIC_DISTRIBUTED_TRACING }}'