From d51f5c2dd269b3577e0ba6ec04c1adc4c063984a Mon Sep 17 00:00:00 2001 From: Tim McCormack Date: Thu, 12 Dec 2024 21:30:10 +0000 Subject: [PATCH] fix: Fix django.cache service tags for Inferred Services config This is intended as a temporary workaround until Datadog can put in a proper fix. --- playbooks/roles/edxapp/templates/edx/app/edxapp/cms.sh.j2 | 5 +++++ playbooks/roles/edxapp/templates/edx/app/edxapp/lms.sh.j2 | 5 +++++ playbooks/roles/edxapp/templates/edx/app/edxapp/worker.sh.j2 | 5 +++++ 3 files changed, 15 insertions(+) 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 edc856f54b1..92d769a4170 100644 --- a/playbooks/roles/edxapp/templates/edx/app/edxapp/cms.sh.j2 +++ b/playbooks/roles/edxapp/templates/edx/app/edxapp/cms.sh.j2 @@ -32,6 +32,11 @@ export DD_PROFILING_TIMELINE_ENABLED=true {% if EDXAPP_DATADOG_INFERRED_SERVICES_ENABLE %} export DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED=true +# Temporary: Override django.cache span service tag to match IDA name. +# This *should* be done by DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED +# but it's not working due to a missing `schematize_service_name` call. +# See https://help.datadoghq.com/hc/en-us/requests/1958899 +export DD_DJANGO_CACHE_SERVICE_NAME=edx-edxapp-cms {% endif -%} export PORT="{{ edxapp_cms_gunicorn_port }}" 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 a449edd7ad9..a53de48c249 100644 --- a/playbooks/roles/edxapp/templates/edx/app/edxapp/lms.sh.j2 +++ b/playbooks/roles/edxapp/templates/edx/app/edxapp/lms.sh.j2 @@ -33,6 +33,11 @@ export DD_PROFILING_TIMELINE_ENABLED=true {% if EDXAPP_DATADOG_INFERRED_SERVICES_ENABLE %} export DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED=true +# Temporary: Override django.cache span service tag to match IDA name. +# This *should* be done by DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED +# but it's not working due to a missing `schematize_service_name` call. +# See https://help.datadoghq.com/hc/en-us/requests/1958899 +export DD_DJANGO_CACHE_SERVICE_NAME=edx-edxapp-lms {% endif -%} export PORT="{{ edxapp_lms_gunicorn_port }}" diff --git a/playbooks/roles/edxapp/templates/edx/app/edxapp/worker.sh.j2 b/playbooks/roles/edxapp/templates/edx/app/edxapp/worker.sh.j2 index 7d45f37a1f9..96670b06be4 100644 --- a/playbooks/roles/edxapp/templates/edx/app/edxapp/worker.sh.j2 +++ b/playbooks/roles/edxapp/templates/edx/app/edxapp/worker.sh.j2 @@ -30,6 +30,11 @@ export DD_PROFILING_ENABLED=true {% if EDXAPP_DATADOG_INFERRED_SERVICES_ENABLE %} export DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED=true +# Temporary: Override django.cache span service tag to match IDA name. +# This *should* be done by DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED +# but it's not working due to a missing `schematize_service_name` call. +# See https://help.datadoghq.com/hc/en-us/requests/1958899 +export DD_DJANGO_CACHE_SERVICE_NAME=edx-edxapp-${SERVICE_VARIANT}-workers {% endif -%} # We exec so that celery is the child of supervisor and can be managed properly