add GA client for error and metric gathering
This commit is contained in:
10
default.py
10
default.py
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user