-
Notifications
You must be signed in to change notification settings - Fork 118
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
Feature request: Provide a hook to handle/report exceptions in processes forked by Supervisor::ForkSupervisor
#297
Comments
Oh, interesting! It seems like Rollbar doesn't provide a subscriber for Rails's error reporting? Exceptions like this one are handled by Rails's error reporting automatically so you shouldn't need to configure anything... but it's possible Rollbar is outdated? |
Ah, I wondered whether that was the case. Is there somewhere in solid_queue other than in If so, I'll close this and work on getting Rollbar to play nicely with Rails error reporting... PS Thanks for the great library! ❤️ |
Thanks a lot @floehopper! 🙏
No, it wouldn't have been captured by that, but I think it should have been handled by Rails's error reporter regardless, being run within In any case, I realise the way |
Ah, I missed that - thanks so much for explaining. I have just verified that the |
Just in case anyone else comes across this - Rollbar added support for the Rails error reporter in v3.6.0. |
Oh, nice! 🙏 Thanks a lot for posting that information. |
In case someone comes along this, I dont think active job reports errors to the error reporter. I've opened rails/rails#53201 to start doing this. Tools like sentry monkey patch active job to send jobs to the reporter: https://github.com/getsentry/sentry-ruby/blob/master/sentry-rails/lib/sentry/rails/active_job.rb#L4. |
@npezza93 indeed! Thanks a lot for doing that 🙏 |
Recently I had an issue when running
rake solid_queue:start
where I was seeing the following exception, because I had neglected to generate & run the migrations in the upgrading instructions:These exceptions were not being reported to our exception monitoring tool (Rollbar).
While I have now resolved the
ArgumentError
problem, I wanted to avoid missing exceptions like this in the future. I tried setting theon_thread_error
configuration option, but this didn't seem to handle exceptions like theArgumentError
above. In the end the only way that worked was to add abegin ... rescue ... end
construct inside thefork
block inSupervisor::ForkSupervisor#start_process
. Is there a better way to do this or is it worth providing a configuration hook to report exceptions like this...?The text was updated successfully, but these errors were encountered: