-
Notifications
You must be signed in to change notification settings - Fork 289
Closed
Description
if you use scope! within a scoped block your context will only apply within that scoped block because of how Rollbar gets shadowed.
Based on the docs here (https://github.com/rollbar/rollbar-gem):
Rollbar.scope!(:person => { :id => user_id })
# If this next line causes an exception, the reported exception (which will
# be reported by Rollbar's standard Sidekiq instrumentation) will also
# include the above person information.
Notification.send_to_user(user_id)
That suggests that even with a raise it should still have the context.
It looks like it was an interaction between a Rollbar.scoped higher in the hierararchy, probably scoping the Rollbar.scope! to the notifier within that block instead of the top level notifier.
When I removed the wrapping Rollbar.scoped block this started working as expected [context showing up].
Alternative - consider how scope! should work in a scoped block.