diff --git a/src/sentry/integrations/github/client.py b/src/sentry/integrations/github/client.py index d09c066e922150..4c2591c4335573 100644 --- a/src/sentry/integrations/github/client.py +++ b/src/sentry/integrations/github/client.py @@ -8,7 +8,6 @@ import orjson import sentry_sdk from requests import PreparedRequest -from sentry_sdk import capture_exception, capture_message from sentry.constants import ObjectStatus from sentry.integrations.github.blame import ( @@ -428,9 +427,7 @@ def _populate_trees_process_error(self, error: ApiError, extra: dict[str, str]) else: # We do not raise the exception so we can keep iterating through the repos. # Nevertheless, investigate the error to determine if we should abort the processing - capture_message( - "Continuing execution. Investigate: %s", error_message, extra=extra, level="warning" - ) + logger.error("Continuing execution. Investigate: %s", error_message, extra=extra) return should_count_error @@ -451,8 +448,7 @@ def _populate_trees(self, repositories: list[dict[str, str]]) -> dict[str, RepoT except ApiError: only_use_cache = True # Report so we can investigate - logger.warning("Loading trees from cache. Execution will continue. Check logs.") - capture_exception(level="warning") + logger.exception("Loading trees from cache. Execution will continue. Check logs.") for index, repo_info in enumerate(repositories): repo_full_name = repo_info["full_name"]