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: Add variables to enable DD profiling. #85

Merged
merged 1 commit into from
Oct 24, 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
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 @@ -103,6 +103,7 @@ 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_DATADOG_PROFILING: False
COMMON_ENABLE_NGINXTRA: False
COMMON_ENABLE_SPLUNKFORWARDER: False
COMMON_ENABLE_NEWRELIC: False
Expand Down
1 change: 1 addition & 0 deletions playbooks/roles/edxapp/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,7 @@ EDXAPP_XML_S3_BUCKET: !!null
EDXAPP_XML_S3_KEY: !!null

EDXAPP_DATADOG_ENABLE: "{{COMMON_ENABLE_DATADOG and COMMON_ENABLE_DATADOG_APP}}"
EDXAPP_DATADOG_PROFILING_ENABLE: "{{EDXAPP_DATADOG_ENABLE and COMMON_ENABLE_DATADOG_PROFILING}}"
# ddtrace 2.7.9 contains a fix for a pymongo incompatibility.
# (Same fix is present in 2.8.2 on the 2.8.x release line.)
EDXAPP_DDTRACE_PIP_SPEC: 'ddtrace>=2.7.9'
Expand Down
5 changes: 5 additions & 0 deletions playbooks/roles/edxapp/templates/edx/app/edxapp/cms.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ export DD_TRACE_LOG_STREAM_HANDLER=false
export DD_DJANGO_INSTRUMENT_MIDDLEWARE=false
{% endif -%}

# We want to be able to toggle this on separately from DD in general.
{% if EDXAPP_DATADOG_PROFILING_ENABLE %}
export DD_PROFILING_ENABLED=true
{% endif -%}

export PORT="{{ edxapp_cms_gunicorn_port }}"
export ADDRESS="{{ edxapp_cms_gunicorn_host }}"
export LANG="{{ EDXAPP_LANG }}"
Expand Down
5 changes: 5 additions & 0 deletions playbooks/roles/edxapp/templates/edx/app/edxapp/lms.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ export DD_DJANGO_INSTRUMENT_MIDDLEWARE=false

{% endif -%}

# We want to be able to toggle this on separately from DD in general.
{% if EDXAPP_DATADOG_PROFILING_ENABLE %}
export DD_PROFILING_ENABLED=true
{% endif -%}

export PORT="{{ edxapp_lms_gunicorn_port }}"
export ADDRESS="{{ edxapp_lms_gunicorn_host }}"
export LANG="{{ EDXAPP_LANG }}"
Expand Down
4 changes: 4 additions & 0 deletions playbooks/roles/edxapp/templates/edx/app/edxapp/worker.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ export DD_TRACE_LOG_STREAM_HANDLER=false
export DD_DJANGO_INSTRUMENT_MIDDLEWARE=false
{% endif -%}

# We want to be able to toggle this on separately from DD in general.
{% if EDXAPP_DATADOG_PROFILING_ENABLE %}
export DD_PROFILING_ENABLED=true
{% endif -%}

# We exec so that celery is the child of supervisor and can be managed properly

Expand Down
Loading