-
Notifications
You must be signed in to change notification settings - Fork 283
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
Sidekiq 4.x scope side effects #416
Comments
Hey @ryansch, thanks for creating the issue, we'll take a look at this. Will |
We have a multi-tenant app. I'd much rather be able to create a piece of sidekiq server middleware to inject the current tenant information into the scope with We're evaluating rollbar while we're currently using honeybadger. With their stuff I can just call |
Thank you very much for the information @ryansch, we'll try to fix this as soon as possible. We'll contact you in this issue. Thanks! |
Hi @ryansch, we've fixed and closed this issue. Thank you very much for reporting this, since it was a real bug. We hope you integration with Rollbar is successfuly, and don't doubt in open any other issue if you have questions, problems with it or you want to purpose something new, improvements, etc... Thanks again. |
I was doing a code review of this gem before adoption and I noticed that there isn't any code to clear thread locals between sidekiq jobs. Since sidekiq 4.x (and maybe earlier?) reuse
Processor
threads to run more than one job (https://github.com/mperham/sidekiq/blob/master/lib/sidekiq/processor.rb#L66-L68), if I useRollbar.scope!
to mutate the current scope I think there may be side effects for the next job. I would expect to see sidekiq middleware that callsRollbar.reset_notifier!
before callingyield
.Note that the easiest way to test this would be to run sidekiq with only one
Processor
thread.The text was updated successfully, but these errors were encountered: