Skip to content

Commit ddc907a

Browse files
pyconsulthush-hush
authored andcommitted
Added two environment variables for configuring datadog api key
1 parent a3ab04d commit ddc907a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

datadog_callback.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ def _load_conf(self):
5959
else:
6060
print "Could not load configuration, invalid file: {}".format(file_path)
6161

62-
return conf_dict.get('api_key', ''), conf_dict.get('url', 'https://app.datadoghq.com')
62+
return conf_dict.get('api_key', os.environ.get('DATADOG_API_KEY', '')), conf_dict.get('url', 'https://app.datadoghq.com')
63+
6364

6465
# Send event to Datadog
6566
def _send_event(self, title, alert_type=None, text=None, tags=None, host=None, event_type=None, event_object=None):

0 commit comments

Comments
 (0)