Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug 1909875: improve CrashIdsFailedToPublish information #6775

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

willkg
Copy link
Contributor

@willkg willkg commented Oct 30, 2024

When a user uses the Reprocessing API, they send some number of crash ids to be reprocessed. If something happens when publishing the crash ids to PubSub, the crash id is added to a "failed" list and the exception is logged. Then at the end if there were any failures, a CrashIdsFailedToPublish exception is thrown with the list of failures.

That causes Django to return an HTTP 500 to the user and sentry captures the CrashIdsFailedToPublish exception, but the event isn't very helpful--we have no idea what happened.

This attempts to alleviate that in a couple of ways:

  1. It uses sentry_sdk.capture_exception() to capture each problem enountered when publishing to PubSub.

    We'll be able to see what's going on in Sentry events.

  2. It keeps track of the errors along with the crash ids and wraps that in the CrashIdsFailedToPublish exception message so we're not ending up with just a list of crash ids--we get the errors, too.

When a user uses the Reprocessing API, they send some number of crash
ids to be reprocessed. If something happens when publishing the crash
ids to PubSub, the crash id is added to a "failed" list and the
exception is logged. Then at the end if there were any failures, a
CrashIdsFailedToPublish exception is thrown with the list of failures.

That causes Django to return an HTTP 500 to the user and sentry captures
the CrashIdsFailedToPublish exception, but the event isn't very
helpful--we have no idea what happened.

This attempts to alleviate that in a couple of ways:

1. It uses sentry_sdk.capture_exception() to capture each problem
   enountered when publishing to PubSub.

   We'll be able to see what's going on in Sentry events.

2. It keeps track of the errors along with the crash ids and wraps that
   in the CrashIdsFailedToPublish exception message so we're not ending
   up with just a list of crash ids--we get the errors, too.
@willkg willkg requested a review from a team as a code owner October 30, 2024 18:44
@willkg willkg added this pull request to the merge queue Oct 30, 2024
Merged via the queue into main with commit ca332c2 Oct 30, 2024
1 check passed
@willkg willkg deleted the willkg-bug-1909875-crashidsfailedtopublish branch October 30, 2024 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants