Commit 4275a87e by David Ormsbee

Merge pull request #2635 from edx/ormsbee/enable_browser_attr_insights5

Create config file for Python New Relic Agent (v2)
parents 3f4881bc 20fab764
......@@ -15,6 +15,17 @@
- install
- install:configuration
- name: setup the newrelic python agent config
template:
src: "newrelic.ini.j2"
dest: "{{ edxapp_app_dir }}/newrelic.ini"
owner: "{{ edxapp_user }}"
group: "{{ common_web_user }}"
mode: "0644"
tags:
- install
- install:configuration
# Optional auth for git
- name: create ssh script for git (not authenticated)
template: >
......
......@@ -10,7 +10,7 @@ command={{ executable }} -c {{ edxapp_app_dir }}/lms_gunicorn.py lms.wsgi
user={{ common_web_user }}
directory={{ edxapp_code_dir }}
environment={% if COMMON_ENABLE_NEWRELIC_APP %}NEW_RELIC_APP_NAME={{ EDXAPP_NEWRELIC_LMS_APPNAME }},NEW_RELIC_LICENSE_KEY={{ NEWRELIC_LICENSE_KEY }},{% endif -%} PORT={{ edxapp_lms_gunicorn_port }},ADDRESS={{ edxapp_lms_gunicorn_host }},LANG={{ EDXAPP_LANG }},DJANGO_SETTINGS_MODULE={{ EDXAPP_LMS_ENV }},SERVICE_VARIANT="lms",PATH="{{ edxapp_deploy_path }}"
environment={% if COMMON_ENABLE_NEWRELIC_APP %}NEW_RELIC_APP_NAME={{ EDXAPP_NEWRELIC_LMS_APPNAME }},NEW_RELIC_LICENSE_KEY={{ NEWRELIC_LICENSE_KEY }},NEW_RELIC_CONFIG_FILE={{ edxapp_app_dir }}/newrelic.ini,{% endif -%} PORT={{ edxapp_lms_gunicorn_port }},ADDRESS={{ edxapp_lms_gunicorn_host }},LANG={{ EDXAPP_LANG }},DJANGO_SETTINGS_MODULE={{ EDXAPP_LMS_ENV }},SERVICE_VARIANT="lms",PATH="{{ edxapp_deploy_path }}"
stdout_logfile={{ supervisor_log_dir }}/%(program_name)s-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)s-stderr.log
killasgroup=true
......
# ---------------------------------------------------------------------------
# edX Note
#
# New Relic allows us to specify the Python Agent config options in a number of
# places. For most functionality, you can get away with a combination of
# environment variables (see the lms.conf.j2 in the configuration repo) and New
# Relic's server-side configuration (the "settings" on your app in their
# monitoring web interface). That being said, some advanced settings can only
# be set in this file or manually in code. That's why this config file is so
# bare -- it specifies only what you *can't* specify in the other two places.
#
# Note that you can always get an up to date snapshot of your combined config
# by going to New Relic's web interface and selecting your app's:
# Settings > Environment > Agent Initialization
[newrelic]
# Turns on or turns off all attributes for browser monitoring. This is the data
# that gets sent to the PageView destination in New Relic Insights. If
# attributes.enabled is false, no attributes will be sent to browser monitoring
# regardless of how this configuration setting is set.
#
# Enabling browser_monitoring.attributes.enabled=true means that we can add a
# custom parameter in our Python code via newrelic.agent.add_custom_parameter()
# and have that show up in PageViews (by default, it only shows up in
# Transactions). This lets us do things like facet front end load time by
# `course_id`.
#
browser_monitoring.attributes.enabled=true
......@@ -231,12 +231,3 @@ labels={{ labels }}
# path if, for example, you have multiple CGroup mounts.
# Default: Distribution dependent, but usually /sys/fs/cgroup or /cgroup.
#cgroup_root=
# Allow custom attributes to be sent to Insights for browser PageViews
#
# https://docs.newrelic.com/docs/agents/python-agent/installation-configuration/python-agent-configuration#browser-settings
#
browser_monitoring.attributes.enabled=true
# https://docs.newrelic.com/docs/insights/new-relic-insights/decorating-events/insights-custom-attributes#forwarding-attributes
browser_monitoring.capture_attributes=true
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment