From 191f2e831fa87ac1aedcbfebbc87a6bcbaaf1529 Mon Sep 17 00:00:00 2001 From: Uma Annamalai Date: Wed, 30 Mar 2022 19:45:07 -0700 Subject: [PATCH] Add corresponding env vars to newrelic.ini. (#509) Co-authored-by: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com> --- newrelic/newrelic.ini | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/newrelic/newrelic.ini b/newrelic/newrelic.ini index e8657ad01b..7234986a4b 100644 --- a/newrelic/newrelic.ini +++ b/newrelic/newrelic.ini @@ -25,14 +25,16 @@ [newrelic] # You must specify the license key associated with your New -# Relic account. This key binds the Python Agent's data to your -# account in the New Relic service. For more information on +# Relic account. This may also be set using the NEW_RELIC_LICENSE_KEY +# environment variable. This key binds the Python Agent's data to +# your account in the New Relic service. For more information on # storing and generating license keys, see # https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/#ingest-license-key license_key = *** REPLACE ME *** # The application name. Set this to be the name of your # application as you would like it to show up in New Relic UI. +# You may also set this using the NEW_RELIC_APP_NAME environment variable. # The UI will then auto-map instances of your application into a # entry on your home dashboard page. You can also specify multiple # app names to group your aggregated data. For further details, @@ -43,7 +45,8 @@ app_name = Python Application # When "true", the agent collects performance data about your # application and reports this data to the New Relic UI at # newrelic.com. This global switch is normally overridden for -# each environment below. +# each environment below. It may also be set using the +# NEW_RELIC_MONITOR_MODE environment variable. monitor_mode = true # Sets the name of a file to log agent messages to. Whatever you @@ -53,7 +56,8 @@ monitor_mode = true # to the file. If not able to out a log file, it is also # possible to say "stderr" and output to standard error output. # This would normally result in output appearing in your web -# server log. +# server log. It can also be set using the NEW_RELIC_LOG +# environment variable. log_file = stdout # Sets the level of detail of messages sent to the log file, if @@ -64,7 +68,8 @@ log_file = stdout # support engineers is "debug". However, this can generate a lot # of information very quickly, so it is best not to keep the # agent at this level for longer than it takes to reproduce the -# problem you are experiencing. +# problem you are experiencing. This may also be set using the +# NEW_RELIC_LOG_LEVEL environment variable. log_level = info # High Security Mode enforces certain security settings, and prevents @@ -73,8 +78,9 @@ log_level = info # not collected and SQL can not be sent to New Relic in its raw form. # To activate High Security Mode, it must be set to 'true' in this # local .ini configuration file AND be set to 'true' in the -# server-side configuration in the New Relic user interface. For -# details, see +# server-side configuration in the New Relic user interface. It can +# also be set using the NEW_RELIC_HIGH_SECURITY environment variable. +# For details, see # https://docs.newrelic.com/docs/subscriptions/high-security high_security = false @@ -90,6 +96,8 @@ high_security = false # would normally always be set as "http" which will result in the # agent then using a SSL tunnel through the HTTP proxy for end to # end encryption. +# See https://docs.newrelic.com/docs/apm/agents/python-agent/configuration/python-agent-configuration/#proxy +# for information on proxy configuration via environment variables. # proxy_scheme = http # proxy_host = hostname # proxy_port = 8080 @@ -182,6 +190,8 @@ thread_profiler.enabled = true # Your application deployments can be recorded through the # New Relic REST API. To use this feature provide your API key # below then use the `newrelic-admin record-deploy` command. +# This can also be set using the NEW_RELIC_API_KEY +# environment variable. # api_key = # Distributed tracing lets you see the path that a request takes