Skip to content

Conversation

lucasmazza
Copy link
Contributor

@lucasmazza lucasmazza commented Sep 15, 2025

Description

Adds a report_errors_via_rails config to sentry-sidekiq to fix #2698. When this is enabled, exceptions reported by the Sidekiq error handler will first go through Rails.error (and Rails::Sentry::ErrorSubscriber) before being sent to Sentry.

This allow exceptions from Sidekiq jobs to use the same context from Rails.error.set_context or Rails.error.add_middleware (available on Rails 8.1+)

Fixes RUBY-92

cursor[bot]

This comment was marked as outdated.

@lucasmazza
Copy link
Contributor Author

I'm testing this with our Rails app but the solution isn't quite there yet - Rails reporter is ignoring the exception because the retry check has marked it as @__rails_error_reported somehow :/

@lucasmazza lucasmazza force-pushed the lm/sidekiq-report-via-rails branch from 23857f9 to 75b5ac9 Compare September 23, 2025 13:27
@dingsdax dingsdax self-requested a review September 26, 2025 09:16
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.

Report Sidekiq errors via Rails.error
1 participant