diff --git a/playbooks/roles/analytics_api/defaults/main.yml b/playbooks/roles/analytics_api/defaults/main.yml index 880f91c0c66..75b79939978 100644 --- a/playbooks/roles/analytics_api/defaults/main.yml +++ b/playbooks/roles/analytics_api/defaults/main.yml @@ -34,8 +34,6 @@ analytics_api_code_dir: "{{ analytics_api_home }}/{{ analytics_api_service_name analytics_api_wsgi_name: "analyticsdataserver" analytics_api_hostname: "analytics-api" -analytics_api_newrelic_appname: 'analytics-api' - # # OS packages # @@ -182,8 +180,6 @@ analytics_api_service_config_overrides: ANALYTICS_API_USERS: "dummy-api-user": "changeme" -ANALYTICS_API_ENABLE_NEWRELIC_DISTRIBUTED_TRACING: false - # Remote config ANALYTICS_API_HERMES_ENABLED: "{{ COMMON_HERMES_ENABLED }}" diff --git a/playbooks/roles/analytics_api/meta/main.yml b/playbooks/roles/analytics_api/meta/main.yml index 4c56e2e7d2b..e750bd7a183 100644 --- a/playbooks/roles/analytics_api/meta/main.yml +++ b/playbooks/roles/analytics_api/meta/main.yml @@ -42,13 +42,11 @@ dependencies: edx_django_service_secret_key: '{{ ANALYTICS_API_SECRET_KEY }}' edx_django_service_wsgi_name: '{{ analytics_api_wsgi_name }}' edx_django_service_hostname: '~^((stage|prod)-)?{{ analytics_api_hostname }}.*' - edx_django_service_newrelic_appname: '{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}-{{ analytics_api_newrelic_appname }}' edx_django_service_automated_users: '{{ ANALYTICS_API_AUTOMATED_USERS }}' edx_django_service_cors_whitelist: '{{ ANALYTICS_API_CORS_ORIGIN_WHITELIST }}' edx_django_service_allow_cors_headers: '{{ ANALYTICS_API_ALLOW_CORS_HEADERS }}' edx_django_service_allow_cors_credentials: '{{ ANALYTICS_API_ALLOW_CORS_CREDENTIALS }}' edx_django_service_basic_auth_exempted_paths_extra: '{{ ANALYTICS_API_BASIC_AUTH_EXEMPTED_PATHS }}' - edx_django_service_enable_newrelic_distributed_tracing: '{{ ANALYTICS_API_ENABLE_NEWRELIC_DISTRIBUTED_TRACING }}' edx_django_service_decrypt_config_enabled: '{{ ANALYTICS_API_DECRYPT_CONFIG_ENABLED }}' edx_django_service_copy_config_enabled: '{{ ANALYTICS_API_COPY_CONFIG_ENABLED }}' edx_django_datadog_service: '{{ analytics_api_datadog_service_name }}' diff --git a/playbooks/roles/ecomworker/defaults/main.yml b/playbooks/roles/ecomworker/defaults/main.yml index 1e2a9ff1ff1..86f59bc1b08 100644 --- a/playbooks/roles/ecomworker/defaults/main.yml +++ b/playbooks/roles/ecomworker/defaults/main.yml @@ -24,12 +24,6 @@ ECOMMERCE_WORKER_REPOS: DESTINATION: '{{ ecommerce_worker_code_dir }}' SSH_KEY: '{{ ECOMMERCE_WORKER_GIT_IDENTITY }}' -# 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 ECOMMERCE_WORKER_DATADOG_ENABLE: "{{COMMON_ENABLE_DATADOG and COMMON_ENABLE_DATADOG_APP}}" 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 0d76d20d3af..4275c376011 100644 --- a/playbooks/roles/ecomworker/templates/edx/app/ecomworker/ecomworker.sh.j2 +++ b/playbooks/roles/ecomworker/templates/edx/app/ecomworker/ecomworker.sh.j2 @@ -6,14 +6,6 @@ {% set executable = ecommerce_worker_venv_bin + '/celery' %} -{% 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 }}' -export NEW_RELIC_APP_NAME='{{ ECOMMERCE_WORKER_NEWRELIC_APPNAME }}' -export NEW_RELIC_LICENSE_KEY='{{ NEWRELIC_LICENSE_KEY }}' -{% endif -%} - {% 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 }}" diff --git a/playbooks/roles/edx_django_service/defaults/main.yml b/playbooks/roles/edx_django_service/defaults/main.yml index 31f2c3e5a80..11e5b244930 100644 --- a/playbooks/roles/edx_django_service/defaults/main.yml +++ b/playbooks/roles/edx_django_service/defaults/main.yml @@ -104,9 +104,6 @@ edx_django_service_basic_auth_exempted_paths_default: edx_django_service_basic_auth_exempted_paths_extra: [] edx_django_service_basic_auth_exempted_paths: '{{ edx_django_service_basic_auth_exempted_paths_default + edx_django_service_basic_auth_exempted_paths_extra }}' -edx_django_service_newrelic_appname: '{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}-{{ edx_django_service_name }}' -edx_django_service_enable_newrelic_app: '{{ COMMON_ENABLE_NEWRELIC_APP }}' -edx_django_service_enable_newrelic_distributed_tracing: false edx_django_datadog_service: 'edx-{{ edx_django_service_name }}' edx_django_service_datadog_enable: '{{ COMMON_ENABLE_DATADOG and (COMMON_ENABLE_DATADOG_APP or edx_django_service_name in COMMON_ENABLE_DATADOG_APP_SERVICES) }}' diff --git a/playbooks/roles/edx_django_service/templates/edx/app/app/app-workers.sh.j2 b/playbooks/roles/edx_django_service/templates/edx/app/app/app-workers.sh.j2 index f1dd4d1b37d..b33a7cc3c5a 100644 --- a/playbooks/roles/edx_django_service/templates/edx/app/app/app-workers.sh.j2 +++ b/playbooks/roles/edx_django_service/templates/edx/app/app/app-workers.sh.j2 @@ -4,20 +4,7 @@ {% set edx_django_service_venv_bin = edx_django_service_venv_dir + "/bin" %} -{% if COMMON_ENABLE_NEWRELIC_APP %} -{% set executable = edx_django_service_venv_bin + '/newrelic-admin run-program ' + edx_django_service_venv_bin + '/celery' %} -{% else %} {% set executable = edx_django_service_venv_bin + '/celery' %} -{% endif %} - -{% if COMMON_ENABLE_NEWRELIC_APP %} -HOSTNAME=$(hostname) -export NEW_RELIC_PROCESS_HOST_DISPLAY_NAME="$HOSTNAME" -if command -v ec2metadata >/dev/null 2>&1; then - INSTANCEID=$(ec2metadata --instance-id); - export NEW_RELIC_PROCESS_HOST_DISPLAY_NAME="$HOSTNAME-$INSTANCEID" -fi -{% endif %} source {{ edx_django_service_home }}/{{ edx_django_service_name }}_env @@ -45,12 +32,7 @@ exec docker run \ --env {{ name }} \ {% endif %} {%- endfor %} -{% if COMMON_ENABLE_NEWRELIC_APP %} - {{ edx_django_service_docker_image_name }}:latest-newrelic \ - newrelic-admin run-program \ -{% else %} {{ edx_django_service_docker_image_name }}:latest \ -{% endif %} celery \ $@ {% else %} diff --git a/playbooks/roles/edx_django_service/templates/edx/app/app/app.sh.j2 b/playbooks/roles/edx_django_service/templates/edx/app/app/app.sh.j2 index a9925244ffc..32a76dd5616 100644 --- a/playbooks/roles/edx_django_service/templates/edx/app/app/app.sh.j2 +++ b/playbooks/roles/edx_django_service/templates/edx/app/app/app.sh.j2 @@ -6,20 +6,6 @@ {% set executable = edx_django_service_venv_bin + '/gunicorn' %} -{% if edx_django_service_enable_newrelic_app %} -{% set executable = edx_django_service_venv_bin + '/newrelic-admin run-program ' + executable %} - -export NEW_RELIC_DISTRIBUTED_TRACING_ENABLED="{{ edx_django_service_enable_newrelic_distributed_tracing }}" -export NEW_RELIC_APP_NAME="{{ edx_django_service_newrelic_appname }}" -HOSTNAME=$(hostname) -export NEW_RELIC_PROCESS_HOST_DISPLAY_NAME="$HOSTNAME" -if command -v ec2metadata >/dev/null 2>&1; then - INSTANCEID=$(ec2metadata --instance-id); - export NEW_RELIC_PROCESS_HOST_DISPLAY_NAME="$HOSTNAME-$INSTANCEID" -fi -export NEW_RELIC_LICENSE_KEY="{{ NEWRELIC_LICENSE_KEY }}" -{% endif -%} - {% if edx_django_service_datadog_enable %} {% set executable = edx_django_service_venv_bin + '/ddtrace-run ' + executable %} export DD_TAGS="service:{{ edx_django_datadog_service }} version:{{ app_version }}" @@ -56,22 +42,12 @@ exec docker run \ --name {{ edx_django_service_name }} \ --mount type=bind,src={{ edx_django_service_app_config_file }},dst={{ edx_django_service_app_config_file }} \ --publish 127.0.0.1:{{ edx_django_service_gunicorn_port }}:{{ edx_django_service_gunicorn_port }}/tcp \ -{% if edx_django_service_enable_newrelic_app %} - --env NEW_RELIC_DISTRIBUTED_TRACING_ENABLED \ - --env NEW_RELIC_APP_NAME \ - --env NEW_RELIC_PROCESS_HOST_DISPLAY_NAME \ - --env NEW_RELIC_LICENSE_KEY="{{ NEWRELIC_LICENSE_KEY }}" \ -{% endif -%} {% for name,value in edx_django_service_environment.items() -%} {%- if value %} --env {{ name }} \ {% endif %} {%- endfor %} -{% if COMMON_ENABLE_NEWRELIC_APP %} - {{ edx_django_service_docker_image_name }}:latest-newrelic -{% else %} {{ edx_django_service_docker_image_name }}:latest -{% endif %} {% else %} exec {{ executable }} -c {{ edx_django_service_home }}/{{ edx_django_service_name }}_gunicorn.py {{ edx_django_service_gunicorn_extra }} {{ edx_django_service_wsgi_name }}.wsgi:application {% endif %} diff --git a/playbooks/roles/insights/defaults/main.yml b/playbooks/roles/insights/defaults/main.yml index 3bdb8d88f45..e49d1f118cd 100644 --- a/playbooks/roles/insights/defaults/main.yml +++ b/playbooks/roles/insights/defaults/main.yml @@ -165,8 +165,6 @@ INSIGHTS_CONFIG: CDN_DOMAIN: "{{ INSIGHTS_CDN_DOMAIN }}" CSRF_COOKIE_SECURE: "{{ INSIGHTS_CSRF_COOKIE_SECURE }}" -INSIGHTS_NEWRELIC_APPNAME: "{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}-analytics-api" -INSIGHTS_ENABLE_NEWRELIC_DISTRIBUTED_TRACING: false INSIGHTS_PIP_EXTRA_ARGS: "-i {{ COMMON_PYPI_MIRROR_URL }}" INSIGHTS_NGINX_PORT: "18110" INSIGHTS_NGINX_SSL_PORT: "18113" diff --git a/playbooks/roles/xqueue/defaults/main.yml b/playbooks/roles/xqueue/defaults/main.yml index 510d69f28f8..694d7a6db6b 100644 --- a/playbooks/roles/xqueue/defaults/main.yml +++ b/playbooks/roles/xqueue/defaults/main.yml @@ -56,9 +56,6 @@ XQUEUE_MYSQL_PORT: '3306' XQUEUE_MYSQL_OPTIONS: {} XQUEUE_MYSQL_CONN_MAX_AGE: 0 # This is Django's default https://docs.djangoproject.com/en/1.11/ref/settings/#conn-max-age -XQUEUE_NEWRELIC_APPNAME: "{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}-xqueue" -XQUEUE_CONSUMER_NEWRELIC_APPNAME: "{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}-xqueue_consumer" - XQUEUE_CONSUMER_DATADOG_APPNAME: "edx-xqueue_consumer" XQUEUE_DATADOG_APPNAME: "edx-{{ xqueue_service_name }}" @@ -97,7 +94,6 @@ XQUEUE_CONFIG: UPLOAD_BUCKET: "{{ XQUEUE_UPLOAD_BUCKET }}" UPLOAD_PATH_PREFIX: "{{ XQUEUE_UPLOAD_PATH_PREFIX }}" DEFAULT_FILE_STORAGE: "{{ XQUEUE_DEFAULT_FILE_STORAGE }}" - NEWRELIC_APPNAME: "{{ XQUEUE_NEWRELIC_APPNAME }}" SUBMISSION_PROCESSING_DELAY: "{{ XQUEUE_SUBMISSION_PROCESSING_DELAY }}" CONSUMER_DELAY: "{{ XQUEUE_CONSUMER_DELAY }}" AWS_ACCESS_KEY_ID: "{{ XQUEUE_AWS_ACCESS_KEY_ID }}" @@ -123,7 +119,6 @@ XQUEUE_CONFIG: ATOMIC_REQUESTS: True CONN_MAX_AGE: "{{ XQUEUE_MYSQL_CONN_MAX_AGE }}" OPTIONS: "{{ XQUEUE_MYSQL_OPTIONS }}" - NEWRELIC_LICENSE_KEY: "{{ NEWRELIC_LICENSE_KEY | default('') }}" CLOUDWATCH_QUEUE_COUNT_METRICS: "{{ XQUEUE_CLOUDWATCH_QUEUE_COUNT_METRICS }}" SESSION_COOKIE_SECURE: "{{ XQUEUE_SESSION_COOKIE_SECURE }}" CSRF_COOKIE_SECURE: "{{ XQUEUE_CSRF_COOKIE_SECURE }}" diff --git a/playbooks/roles/xqueue/templates/xqueue.conf.j2 b/playbooks/roles/xqueue/templates/xqueue.conf.j2 index a53ff3123f4..06186c92a49 100644 --- a/playbooks/roles/xqueue/templates/xqueue.conf.j2 +++ b/playbooks/roles/xqueue/templates/xqueue.conf.j2 @@ -1,10 +1,6 @@ [program:xqueue] -{% if COMMON_ENABLE_NEWRELIC_APP %} -{% set executable = xqueue_venv_bin + '/newrelic-admin run-program ' + xqueue_venv_bin + '/gunicorn' %} -{% else %} {% set executable = xqueue_venv_bin + '/gunicorn' %} -{% endif %} {% if COMMON_ENABLE_DATADOG and COMMON_ENABLE_DATADOG_APP %} {% set executable = xqueue_venv_bin + '/ddtrace-run ' + executable %} @@ -17,7 +13,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_HANDLER_RESOURCE_FORMAT=true,DD_TAGS="service:{{ XQUEUE_DATADOG_APPNAME }} version:{{ app_version }}",DD_TRACE_LOG_STREAM_HANDLER=false,DD_PROFILING_ENABLED=true,DD_DATA_STREAMS_ENABLED=true,DD_LOGS_INJECTION=true,{% 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_DATADOG and COMMON_ENABLE_DATADOG_APP %}DD_DJANGO_USE_HANDLER_RESOURCE_FORMAT=true,DD_TAGS="service:{{ XQUEUE_DATADOG_APPNAME }} version:{{ app_version }}",DD_TRACE_LOG_STREAM_HANDLER=false,DD_PROFILING_ENABLED=true,DD_DATA_STREAMS_ENABLED=true,DD_LOGS_INJECTION=true,{% 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 diff --git a/playbooks/roles/xqueue/templates/xqueue_consumer.conf.j2 b/playbooks/roles/xqueue/templates/xqueue_consumer.conf.j2 index b15422dfb6a..2f30d365f19 100644 --- a/playbooks/roles/xqueue/templates/xqueue_consumer.conf.j2 +++ b/playbooks/roles/xqueue/templates/xqueue_consumer.conf.j2 @@ -1,10 +1,6 @@ [program:xqueue_consumer] -{% if COMMON_ENABLE_NEWRELIC_APP %} -{% set executable = xqueue_venv_bin + '/newrelic-admin run-program ' + xqueue_venv_bin + '/django-admin run_consumer' %} -{% else %} {% set executable = xqueue_venv_bin + '/django-admin run_consumer' %} -{% endif %} {% if COMMON_ENABLE_DATADOG and COMMON_ENABLE_DATADOG_APP %} {% set executable = xqueue_venv_bin + '/ddtrace-run ' + executable %} @@ -17,11 +13,10 @@ 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_HANDLER_RESOURCE_FORMAT=true,DD_TAGS="service:{{ XQUEUE_CONSUMER_DATADOG_APPNAME }} version:{{ app_version }}",DD_TRACE_LOG_STREAM_HANDLER=false,DD_PROFILING_ENABLED=true,DD_DATA_STREAMS_ENABLED=true,DD_LOGS_INJECTION=true,{% endif -%}LANG={{ XQUEUE_LANG }},XQUEUE_CFG={{ COMMON_CFG_DIR }}/xqueue.yml +environment={% if COMMON_ENABLE_DATADOG and COMMON_ENABLE_DATADOG_APP %}DD_DJANGO_USE_HANDLER_RESOURCE_FORMAT=true,DD_TAGS="service:{{ XQUEUE_CONSUMER_DATADOG_APPNAME }} version:{{ app_version }}",DD_TRACE_LOG_STREAM_HANDLER=false,DD_PROFILING_ENABLED=true,DD_DATA_STREAMS_ENABLED=true,DD_LOGS_INJECTION=true,{% 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 killasgroup=true stopasgroup=true startsecs=0 -