Skip to content

Commit

Permalink
feat: Use common edx- prefix for Datadog service: tag (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
timmc-edx authored May 8, 2024
1 parent 307b910 commit 01d773f
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export NEW_RELIC_LICENSE_KEY='{{ NEWRELIC_LICENSE_KEY }}'

{% if COMMON_ENABLE_DATADOG and COMMON_ENABLE_DATADOG_APP %}
{% set executable = ecommerce_worker_venv_bin + '/ddtrace-run ' + executable %}
export DD_TAGS="service:{{ ecommerce_worker_service_name }}"
export DD_TAGS="service:edx-{{ ecommerce_worker_service_name }}"
export DD_DJANGO_USE_LEGACY_RESOURCE_FORMAT=true
# Copied from edx_django_service playbook for consistency; Datadog
# trace debug logging issue doesn't actually affect edxapp for some
Expand Down
1 change: 1 addition & 0 deletions playbooks/roles/edx_django_service/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ edx_django_service_basic_auth_exempted_paths: '{{ edx_django_service_basic_auth_

edx_django_service_newrelic_appname: '{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}-{{ edx_django_service_name }}'
edx_django_service_enable_newrelic_distributed_tracing: false
edx_django_datadog_service: 'edx-{{ edx_django_service_name }}'

edx_django_service_repos:
- PROTOCOL: '{{ edx_django_service_git_protocol }}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export NEW_RELIC_LICENSE_KEY="{{ NEWRELIC_LICENSE_KEY }}"

{% if COMMON_ENABLE_DATADOG and COMMON_ENABLE_DATADOG_APP %}
{% set executable = edx_django_service_venv_bin + '/ddtrace-run ' + executable %}
export DD_TAGS="service:{{ edx_django_service_name }}"
export DD_TAGS="service:{{ edx_django_datadog_service }}"
export DD_DJANGO_USE_LEGACY_RESOURCE_FORMAT=true
# Workaround for
# https://github.com/edx/edx-arch-experiments/issues/591 (heavy
Expand Down
2 changes: 1 addition & 1 deletion playbooks/roles/edxapp/templates/edx/app/edxapp/cms.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export NEW_RELIC_LICENSE_KEY="{{ NEWRELIC_LICENSE_KEY }}"

{% if COMMON_ENABLE_DATADOG and COMMON_ENABLE_DATADOG_APP %}
{% set executable = edxapp_venv_bin + '/ddtrace-run ' + executable %}
export DD_TAGS="service:edxapp-cms"
export DD_TAGS="service:edx-edxapp-cms"
export DD_DJANGO_USE_LEGACY_RESOURCE_FORMAT=true
# Copied from edx_django_service playbook for consistency; Datadog
# trace debug logging issue doesn't actually affect edxapp for some
Expand Down
2 changes: 1 addition & 1 deletion playbooks/roles/edxapp/templates/edx/app/edxapp/lms.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export NEW_RELIC_LICENSE_KEY="{{ NEWRELIC_LICENSE_KEY }}"

{% if COMMON_ENABLE_DATADOG and COMMON_ENABLE_DATADOG_APP %}
{% set executable = edxapp_venv_bin + '/ddtrace-run ' + executable %}
export DD_TAGS="service:edxapp-lms"
export DD_TAGS="service:edx-edxapp-lms"
export DD_DJANGO_USE_LEGACY_RESOURCE_FORMAT=true
# Copied from edx_django_service playbook for consistency; Datadog
# trace debug logging issue doesn't actually affect edxapp for some
Expand Down
2 changes: 1 addition & 1 deletion playbooks/roles/forum/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ FORUM_NEW_RELIC_LICENSE_KEY: '{{ NEWRELIC_LICENSE_KEY | default("") }}'
FORUM_NEW_RELIC_APP_NAME: "{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}-forum"

# Datadog CONFIG
FORUM_DD_TAGS: "service:forum"
FORUM_DD_TAGS: "service:edx-forum"

FORUM_WORKER_PROCESSES: "4"
FORUM_LISTEN_HOST: "0.0.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export NEW_RELIC_LICENSE_KEY="{{ NEWRELIC_LICENSE_KEY }}"

{% if COMMON_ENABLE_DATADOG and COMMON_ENABLE_DATADOG_APP %}
{% set executable = insights_venv_bin + '/ddtrace-run ' + executable %}
export DD_TAGS="service:{{ insights_service_name }}"
export DD_TAGS="service:edx-{{ insights_service_name }}"
export DD_DJANGO_USE_LEGACY_RESOURCE_FORMAT=true
# Copied from edx_django_service playbook for consistency; Datadog
# trace debug logging issue doesn't actually affect edxapp for some
Expand Down
4 changes: 2 additions & 2 deletions playbooks/roles/xqueue/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ XQUEUE_MYSQL_CONN_MAX_AGE: 0 # This is Django's default https://docs.djangoproje
XQUEUE_NEWRELIC_APPNAME: "{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}-xqueue"
XQUEUE_CONSUMER_NEWRELIC_APPNAME: "{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}-xqueue_consumer"

XQUEUE_CONSUMER_DATADOG_APPNAME: "xqueue_consumer"
XQUEUE_DATADOG_APPNAME: "{{ xqueue_service_name }}"
XQUEUE_CONSUMER_DATADOG_APPNAME: "edx-xqueue_consumer"
XQUEUE_DATADOG_APPNAME: "edx-{{ xqueue_service_name }}"

# Set the number of gunicorn front end workers explicitely for xqueue
XQUEUE_WORKERS: !!null
Expand Down
2 changes: 1 addition & 1 deletion playbooks/roles/xqwatcher/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ XQWATCHER_REPOS:
XQWATCHER_NEWRELIC_APPNAME: "{{ COMMON_DEPLOYMENT }}-{{ COMMON_ENVIRONMENT }}-xqwatcher"
XQWATCHER_PIP_EXTRA_ARGS: "-i {{ COMMON_PYPI_MIRROR_URL }}"

XQWATCHER_DATADOG_APPNAME: "{{ xqwatcher_service_name }}"
XQWATCHER_DATADOG_APPNAME: "edx-{{ xqwatcher_service_name }}"
#
#
# vars are namespace with the module name.
Expand Down

0 comments on commit 01d773f

Please sign in to comment.