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

Reraise exceptions on Rollbar.process_payload_safely. #282

Merged
merged 3 commits into from
Aug 28, 2015

Conversation

jondeandres
Copy link
Contributor

We will reraise exceptions in Rolbar.process_payload_safely so async queues can retry the job or, in general, handle an error report some way.

At same time that exception is silenced so we don't generate infinite reports. This example is what we want to avoid:

  1. New exception in a the project is raised
  2. That report enqueued to Sidekiq queue.
  3. The Sidekiq job tries to send the report to our API
  4. The report fails, for example cause a network failure,
    and a exception is raised
  5. We report an internal error for that exception
  6. We reraise the exception so Sidekiq job fails and
    Sidekiq can retry the job reporting the original exception
  7. Cause the job failed and Sidekiq can be managed by rollbar we'll
    report a new exception.
  8. Go to point 2.

We'll then push to Sidekiq queue indefinitely until the network failure is fixed.

Using Rollbar.silenced we avoid the above behavior but Sidekiq will have a chance to retry the original job.

# 5. We report an internal error for that exception
# 6. We reraise the exception so Sidekiq job fails and
# Sidekiq can retry the job reporting the original exception
# 7. Cause the job failed and Sidekiq can be managed by rollbar we'll
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: s/Cause/Because/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

jondeandres added a commit that referenced this pull request Aug 28, 2015
Reraise exceptions on Rollbar.process_payload_safely.
@jondeandres jondeandres merged commit c29b021 into master Aug 28, 2015
@jondeandres jondeandres deleted the reraise-on-async-processing branch August 28, 2015 12:43
@dgilperez
Copy link

👏

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.

3 participants