forked from p15670423/monkey
Contain exception if exporter init fails on the island
This commit is contained in:
parent
b6b58b3c50
commit
53361e3812
|
@ -9,11 +9,18 @@ logger = logging.getLogger(__name__)
|
|||
|
||||
def populate_exporter_list():
|
||||
manager = ReportExporterManager()
|
||||
RemoteRunAwsService.init()
|
||||
if RemoteRunAwsService.is_running_on_aws() and ('aws' == env.get_deployment()):
|
||||
manager.add_exporter_to_list(AWSExporter)
|
||||
try_add_aws_exporter_to_manager(manager)
|
||||
|
||||
if len(manager.get_exporters_list()) != 0:
|
||||
logger.debug(
|
||||
"Populated exporters list with the following exporters: {0}".format(str(manager.get_exporters_list())))
|
||||
|
||||
|
||||
def try_add_aws_exporter_to_manager(manager):
|
||||
# noinspection PyBroadException
|
||||
try:
|
||||
RemoteRunAwsService.init()
|
||||
if RemoteRunAwsService.is_running_on_aws() and ('aws' == env.get_deployment()):
|
||||
manager.add_exporter_to_list(AWSExporter)
|
||||
except Exception as err:
|
||||
logger.error("Failed adding aws exporter to manager.", exc_info=True)
|
||||
|
|
Loading…
Reference in New Issue