Adding additional failure conditions to sentry tracking. (#853)

* Adding additional failure conditions to sentry tracking.

* Removing sentry extension as a circular import.
This commit is contained in:
kevgliss
2017-07-13 14:49:04 -07:00
committed by GitHub
parent 6779e19ac9
commit 61c493fc91
6 changed files with 54 additions and 34 deletions

View File

@ -14,7 +14,7 @@ from flask_script import Manager
from flask import current_app
from lemur.extensions import metrics
from lemur.extensions import metrics, sentry
from lemur.plugins.base import plugins
from lemur.sources import service as source_service
@ -87,6 +87,7 @@ def sync(source_strings):
)
metrics.send('sync_failed', 'counter', 1, metric_tags={'source': source.label})
sentry.captureException()
@manager.option('-s', '--sources', dest='source_strings', action='append', help='Sources to operate on.')
@ -117,6 +118,7 @@ def clean(source_strings, commit):
except Exception as e:
current_app.logger.exception(e)
metrics.send('clean_failed', 'counter', 1, metric_tags={'source': source.label})
sentry.captureException()
current_app.logger.warning("Removed {0} from source {1} during cleaning".format(
certificate.name,