Skip to content

Commit

Permalink
feat: add plumbing for ecomworker prod DD to be turned on
Browse files Browse the repository at this point in the history
  • Loading branch information
christopappas committed May 23, 2024
1 parent ea52958 commit b540883
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions playbooks/roles/ecomworker/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ ECOMMERCE_WORKER_REPOS:
ECOMMERCE_WORKER_NEWRELIC_APPNAME: '{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}-{{ ecommerce_worker_service_name }}'
ECOMMERCE_WORKER_ENABLE_NEWRELIC_DISTRIBUTED_TRACING: false

# Datadog
ECOMMERCE_WORKER_DATADOG_ENABLE: "{{COMMON_ENABLE_DATADOG and COMMON_ECOMMERCE_WORKER_DATADOG_ENABLE}}"

# CELERY
ECOMMERCE_WORKER_BROKER_USERNAME: ''
ECOMMERCE_WORKER_BROKER_PASSWORD: 'celery'
Expand Down
2 changes: 1 addition & 1 deletion playbooks/roles/ecomworker/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
- install:app-requirements

- name: "Install Datadog APM requirements"
when: COMMON_ENABLE_DATADOG and COMMON_ENABLE_DATADOG_APP
when: ECOMMERCE_WORKER_DATADOG_ENABLE
pip:
name:
- ddtrace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export NEW_RELIC_APP_NAME='{{ ECOMMERCE_WORKER_NEWRELIC_APPNAME }}'
export NEW_RELIC_LICENSE_KEY='{{ NEWRELIC_LICENSE_KEY }}'
{% endif -%}

{% if COMMON_ENABLE_DATADOG and COMMON_ENABLE_DATADOG_APP %}
{% if ECOMMERCE_WORKER_DATADOG_ENABLE %}
{% set executable = ecommerce_worker_venv_bin + '/ddtrace-run ' + executable %}
export DD_TAGS="service:edx-{{ ecommerce_worker_service_name }} version:{{ app_version }}"
export DD_DJANGO_USE_HANDLER_RESOURCE_FORMAT=true
Expand Down

0 comments on commit b540883

Please sign in to comment.