def sentry_report_exception(context=None):
sentry = raven.Client(SENTRY_URL)
if context is not None:
with sentry.context:
sentry.context.merge(context)
try:
sentry.captureException()
finally:
sentry.context.clear()
文章目录