Commit 857c4c0c by Calen Pennington

Correctly use the Logger.exception method to capture exception backtraces if…

Correctly use the Logger.exception method to capture exception backtraces if datadog timing logging fails
parent dbc6b5c0
...@@ -79,8 +79,8 @@ class DatadogFormatter(Formatter): ...@@ -79,8 +79,8 @@ class DatadogFormatter(Formatter):
points=playbook_timestamp.duration.total_seconds(), points=playbook_timestamp.duration.total_seconds(),
tags=["playbook:{0}".format(self.clean_tag_value(playbook_name))] tags=["playbook:{0}".format(self.clean_tag_value(playbook_name))]
) )
except Exception as ex: except Exception:
LOGGER.error(ex.message) LOGGER.exception("Failed to log timing data to datadog")
class JsonFormatter(Formatter): class JsonFormatter(Formatter):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment