Skip to content
Open
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
10 changes: 8 additions & 2 deletions newrelic_plugin_agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ def license_key(self):
:rtype: str

"""
return self.config.application.license_key
licenseKey = os.getenv('NEWRELIC_LICENSE_KEY')
if licenseKey == None:
licenseKey = self.config.application.license_key
return licenseKey

def poll_plugin(self, plugin_name, plugin, config):
"""Kick off a background thread to run the processing task.
Expand All @@ -98,7 +101,10 @@ def poll_plugin(self, plugin_name, plugin, config):
if not isinstance(config, (list, tuple)):
config = [config]

for instance in config:
for idx, instance in enumerate(config):
appName = os.getenv("NEWRELIC_%s_APP_NAME_%i" % (plugin_name.upper(), idx))
if appName != None:
instance.name = appName
thread = threading.Thread(target=self.thread_process,
kwargs={'config': instance,
'name': plugin_name,
Expand Down