diff --git a/requirements.txt b/requirements.txt --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ click iso8601 requests +sentry-sdk \ No newline at end of file diff --git a/swh/deposit/loader/checker.py b/swh/deposit/loader/checker.py --- a/swh/deposit/loader/checker.py +++ b/swh/deposit/loader/checker.py @@ -6,6 +6,8 @@ import logging from typing import Any, Dict +import sentry_sdk + from swh.core import config from swh.deposit.client import PrivateApiDepositClient @@ -33,6 +35,7 @@ status = "eventful" if r == "verified" else "failed" except Exception: logger.exception("Failure during check on '%s'", deposit_check_url) + sentry_sdk.capture_exception() status = "failed" logger.debug("Check status: %s", status) return {"status": status}