summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Dumpleton <Graham.Dumpleton@gmail.com>2014-12-24 11:52:46 +1100
committerGraham Dumpleton <Graham.Dumpleton@gmail.com>2014-12-24 11:52:46 +1100
commit7baf7681226144e62ccce1c8c4edfeddbbdacf67 (patch)
treeba546c840c4fe77543bb95d541e8d24373b7bf0e
parent7b703b1ba53a32fe64b04cb4019aa289baae9035 (diff)
downloadmod_wsgi-metrics-7baf7681226144e62ccce1c8c4edfeddbbdacf67.tar.gz
New Relic platform agent not correctly using environment variables for license key and application when no config file.
-rw-r--r--src/metrics/newrelic/agent.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/metrics/newrelic/agent.py b/src/metrics/newrelic/agent.py
index 86ac388..f78023a 100644
--- a/src/metrics/newrelic/agent.py
+++ b/src/metrics/newrelic/agent.py
@@ -71,6 +71,13 @@ def configuration_settings(app_name=None, license_key=None,
license_key = os.environ.get('NEW_RELIC_LICENSE_KEY', None)
license_key = option('license_key', default=license_key)
+ else:
+ if app_name is None:
+ app_name = os.environ.get('NEW_RELIC_APP_NAME', None)
+
+ if license_key is None:
+ license_key = os.environ.get('NEW_RELIC_LICENSE_KEY', None)
+
if app_name is not None:
app_name = app_name.split(';')[0].strip()