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: REV-4051 | allow edx_django_service to be provided with specifi… #11

Merged
merged 2 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions playbooks/roles/common_vars/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ COMMON_MONGO_READ_ONLY_PASS: !!null
COMMON_ENABLE_DATADOG: False
# Enable APM monitoring with Datadog (metrics, traces, and logs)
COMMON_ENABLE_DATADOG_APP: False
COMMON_ENABLE_DATADOG_APP_SERVICES: []
COMMON_ENABLE_NGINXTRA: False
COMMON_ENABLE_SPLUNKFORWARDER: False
COMMON_ENABLE_NEWRELIC: False
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 @@ -104,6 +104,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_datadog_enable: '{{ COMMON_ENABLE_DATADOG and (COMMON_ENABLE_DATADOG_APP or edx_django_service_name in COMMON_ENABLE_DATADOG_APP_SERVICES }}'

edx_django_service_repos:
- PROTOCOL: '{{ edx_django_service_git_protocol }}'
Expand Down
4 changes: 3 additions & 1 deletion playbooks/roles/edx_django_service/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@
- install:app-requirements

- name: "Install Datadog APM requirements"
when: COMMON_ENABLE_DATADOG and COMMON_ENABLE_DATADOG_APP
when: >
COMMON_ENABLE_DATADOG and
(COMMON_ENABLE_DATADOG_APP or edx_django_service_datadog_enable)
christopappas marked this conversation as resolved.
Show resolved Hide resolved
pip:
christopappas marked this conversation as resolved.
Show resolved Hide resolved
name:
- ddtrace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fi
export NEW_RELIC_LICENSE_KEY="{{ NEWRELIC_LICENSE_KEY }}"
{% endif -%}

{% if COMMON_ENABLE_DATADOG and COMMON_ENABLE_DATADOG_APP %}
{% if COMMON_ENABLE_DATADOG and (COMMON_ENABLE_DATADOG_APP or edx_django_service_datadog_enable) %}
christopappas marked this conversation as resolved.
Show resolved Hide resolved
{% set executable = edx_django_service_venv_bin + '/ddtrace-run ' + executable %}
export DD_TAGS="service:{{ edx_django_datadog_service }}"
export DD_DJANGO_USE_HANDLER_RESOURCE_FORMAT=true
Expand Down
Loading