Adding health exception tracking. (#977)
This commit is contained in:
parent
9319dda0ec
commit
bbf73c48a3
|
@ -8,6 +8,7 @@
|
||||||
"""
|
"""
|
||||||
from flask import Blueprint
|
from flask import Blueprint
|
||||||
from lemur.database import db
|
from lemur.database import db
|
||||||
|
from lemur.extensions import sentry
|
||||||
|
|
||||||
mod = Blueprint('healthCheck', __name__)
|
mod = Blueprint('healthCheck', __name__)
|
||||||
|
|
||||||
|
@ -17,7 +18,8 @@ def health():
|
||||||
try:
|
try:
|
||||||
if healthcheck(db):
|
if healthcheck(db):
|
||||||
return 'ok'
|
return 'ok'
|
||||||
except:
|
except Exception:
|
||||||
|
sentry.captureException()
|
||||||
return 'db check failed'
|
return 'db check failed'
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue