Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: Switch to method+handler Datadog resource name format #9

Merged
merged 1 commit into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,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:edx-{{ ecommerce_worker_service_name }}"
export DD_DJANGO_USE_LEGACY_RESOURCE_FORMAT=true
export DD_DJANGO_USE_HANDLER_RESOURCE_FORMAT=true
# Copied from edx_django_service playbook for consistency; Datadog
# trace debug logging issue doesn't actually affect edxapp for some
# reason.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,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_datadog_service }}"
export DD_DJANGO_USE_LEGACY_RESOURCE_FORMAT=true
export DD_DJANGO_USE_HANDLER_RESOURCE_FORMAT=true
# Workaround for
# https://github.com/edx/edx-arch-experiments/issues/591 (heavy
# streams of trace-debug logs from ddtrace.)
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 @@ -23,7 +23,7 @@ export NEW_RELIC_LICENSE_KEY="{{ NEWRELIC_LICENSE_KEY }}"
{% 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
export DD_DJANGO_USE_HANDLER_RESOURCE_FORMAT=true
# Copied from edx_django_service playbook for consistency; Datadog
# trace debug logging issue doesn't actually affect edxapp for some
# reason.
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 @@ -23,7 +23,7 @@ export NEW_RELIC_LICENSE_KEY="{{ NEWRELIC_LICENSE_KEY }}"
{% 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
export DD_DJANGO_USE_HANDLER_RESOURCE_FORMAT=true
# Copied from edx_django_service playbook for consistency; Datadog
# trace debug logging issue doesn't actually affect edxapp for some
# reason.
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 @@ -91,7 +91,7 @@ forum_base_env: &forum_base_env
LISTEN_HOST: "{{ FORUM_LISTEN_HOST }}"
LISTEN_PORT: "{{ FORUM_LISTEN_PORT }}"
DD_TAGS: "{{ FORUM_DD_TAGS }}"
DD_DJANGO_USE_LEGACY_RESOURCE_FORMAT: "true"
DD_DJANGO_USE_HANDLER_RESOURCE_FORMAT: "true"
DD_TRACE_LOG_STREAM_HANDLER: "false"

forum_env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,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:edx-{{ insights_service_name }}"
export DD_DJANGO_USE_LEGACY_RESOURCE_FORMAT=true
export DD_DJANGO_USE_HANDLER_RESOURCE_FORMAT=true
# Copied from edx_django_service playbook for consistency; Datadog
# trace debug logging issue doesn't actually affect edxapp for some
# reason.
Expand Down
2 changes: 1 addition & 1 deletion playbooks/roles/xqueue/templates/xqueue.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ directory={{ xqueue_code_dir }}

# Copied DD_TRACE_LOG_STREAM_HANDLER config from edx_django_service. This is required
# to disable Datadog trace debug logging.
environment={% if COMMON_ENABLE_NEWRELIC_APP %}NEW_RELIC_APP_NAME={{ XQUEUE_NEWRELIC_APPNAME }},NEW_RELIC_LICENSE_KEY={{ NEWRELIC_LICENSE_KEY }},{% endif -%}{% if COMMON_ENABLE_DATADOG and COMMON_ENABLE_DATADOG_APP %}DD_DJANGO_USE_LEGACY_RESOURCE_FORMAT=true,DD_TAGS=service:{{ XQUEUE_DATADOG_APPNAME }},DD_TRACE_LOG_STREAM_HANDLER=false,{% endif -%}PID=/var/tmp/xqueue.pid,PORT={{ xqueue_gunicorn_port }},ADDRESS={{ xqueue_gunicorn_host }},LANG={{ XQUEUE_LANG }},DJANGO_SETTINGS_MODULE=xqueue.{{ XQUEUE_SETTINGS }},XQUEUE_CFG={{ COMMON_CFG_DIR }}/xqueue.yml
environment={% if COMMON_ENABLE_NEWRELIC_APP %}NEW_RELIC_APP_NAME={{ XQUEUE_NEWRELIC_APPNAME }},NEW_RELIC_LICENSE_KEY={{ NEWRELIC_LICENSE_KEY }},{% endif -%}{% if COMMON_ENABLE_DATADOG and COMMON_ENABLE_DATADOG_APP %}DD_DJANGO_USE_HANDLER_RESOURCE_FORMAT=true,DD_TAGS=service:{{ XQUEUE_DATADOG_APPNAME }},DD_TRACE_LOG_STREAM_HANDLER=false,{% endif -%}PID=/var/tmp/xqueue.pid,PORT={{ xqueue_gunicorn_port }},ADDRESS={{ xqueue_gunicorn_host }},LANG={{ XQUEUE_LANG }},DJANGO_SETTINGS_MODULE=xqueue.{{ XQUEUE_SETTINGS }},XQUEUE_CFG={{ COMMON_CFG_DIR }}/xqueue.yml

stdout_logfile={{ supervisor_log_dir }}/%(program_name)s-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)s-stderr.log
Expand Down
2 changes: 1 addition & 1 deletion playbooks/roles/xqueue/templates/xqueue_consumer.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ directory={{ xqueue_code_dir }}

# Copied DD_TRACE_LOG_STREAM_HANDLER config from edx_django_service. This is required
# to disable Datadog trace debug logging.
environment={% if COMMON_ENABLE_NEWRELIC_APP %}NEW_RELIC_STARTUP_TIMEOUT=10,NEW_RELIC_APP_NAME={{ XQUEUE_CONSUMER_NEWRELIC_APPNAME }},NEW_RELIC_LICENSE_KEY={{ NEWRELIC_LICENSE_KEY }},{% endif -%}{% if COMMON_ENABLE_DATADOG and COMMON_ENABLE_DATADOG_APP %}DD_DJANGO_USE_LEGACY_RESOURCE_FORMAT=true,DD_TAGS=service:{{ XQUEUE_CONSUMER_DATADOG_APPNAME }},DD_TRACE_LOG_STREAM_HANDLER=false,{% endif -%}LANG={{ XQUEUE_LANG }},XQUEUE_CFG={{ COMMON_CFG_DIR }}/xqueue.yml
environment={% if COMMON_ENABLE_NEWRELIC_APP %}NEW_RELIC_STARTUP_TIMEOUT=10,NEW_RELIC_APP_NAME={{ XQUEUE_CONSUMER_NEWRELIC_APPNAME }},NEW_RELIC_LICENSE_KEY={{ NEWRELIC_LICENSE_KEY }},{% endif -%}{% if COMMON_ENABLE_DATADOG and COMMON_ENABLE_DATADOG_APP %}DD_DJANGO_USE_HANDLER_RESOURCE_FORMAT=true,DD_TAGS=service:{{ XQUEUE_CONSUMER_DATADOG_APPNAME }},DD_TRACE_LOG_STREAM_HANDLER=false,{% endif -%}LANG={{ XQUEUE_LANG }},XQUEUE_CFG={{ COMMON_CFG_DIR }}/xqueue.yml

stdout_logfile={{ supervisor_log_dir }}/%(program_name)s-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)s-stderr.log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ stdout_logfile={{ supervisor_log_dir }}/%(program_name)s-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)s-stderr.log
# Copied DD_TRACE_LOG_STREAM_HANDLER config from edx_django_service. This is required
# to disable Datadog trace debug logging.
environment={% if COMMON_ENABLE_NEWRELIC_APP %}NEW_RELIC_APP_NAME={{ XQWATCHER_NEWRELIC_APPNAME }},NEW_RELIC_LICENSE_KEY={{ NEWRELIC_LICENSE_KEY }},{% endif -%}{% if COMMON_ENABLE_DATADOG and COMMON_ENABLE_DATADOG_APP %}DD_DJANGO_USE_LEGACY_RESOURCE_FORMAT=true,DD_TAGS=service:{{ XQWATCHER_DATADOG_APPNAME }},DD_TRACE_LOG_STREAM_HANDLER=false,{% endif -%}
environment={% if COMMON_ENABLE_NEWRELIC_APP %}NEW_RELIC_APP_NAME={{ XQWATCHER_NEWRELIC_APPNAME }},NEW_RELIC_LICENSE_KEY={{ NEWRELIC_LICENSE_KEY }},{% endif -%}{% if COMMON_ENABLE_DATADOG and COMMON_ENABLE_DATADOG_APP %}DD_DJANGO_USE_HANDLER_RESOURCE_FORMAT=true,DD_TAGS=service:{{ XQWATCHER_DATADOG_APPNAME }},DD_TRACE_LOG_STREAM_HANDLER=false,{% endif -%}
killasgroup=true
stopasgroup=true
Loading