add GA client for error and metric gathering

This commit is contained in:
sfaulds
2017-07-04 20:05:04 +10:00
parent 6e1ce2871f
commit f8d79e7ac1
8 changed files with 373 additions and 28 deletions

View File

@@ -2,12 +2,20 @@
from resources.lib.simple_logging import SimpleLogging
from resources.lib.functions import mainEntryPoint
from resources.lib.ga_client import GoogleAnalytics, log_error
log = SimpleLogging('default')
log.info("About to enter mainEntryPoint()")
mainEntryPoint()
try:
mainEntryPoint()
except Exception as error:
ga = GoogleAnalytics()
err_strings = ga.formatException()
ga.sendEventData("Exception", err_strings[0], err_strings[1])
log.error(error)
raise
# clear done and exit.
# sys.modules.clear()