diff options
author | Graham Dumpleton <Graham.Dumpleton@gmail.com> | 2014-12-24 11:52:46 +1100 |
---|---|---|
committer | Graham Dumpleton <Graham.Dumpleton@gmail.com> | 2014-12-24 11:52:46 +1100 |
commit | 7baf7681226144e62ccce1c8c4edfeddbbdacf67 (patch) | |
tree | ba546c840c4fe77543bb95d541e8d24373b7bf0e | |
parent | 7b703b1ba53a32fe64b04cb4019aa289baae9035 (diff) | |
download | mod_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.py | 7 |
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() |