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

Add use case to docs: using scope! within a scoped block #653

Closed
and-megan opened this issue Nov 17, 2017 · 1 comment
Closed

Add use case to docs: using scope! within a scoped block #653

and-megan opened this issue Nov 17, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@and-megan
Copy link
Contributor

and-megan commented Nov 17, 2017

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.

@rivkahstandig3636 rivkahstandig3636 self-assigned this Dec 27, 2017
@rivkahstandig3636 rivkahstandig3636 added this to the v2.15.6 milestone Jan 18, 2018
@rivkahstandig3636
Copy link
Contributor

Closed via #679

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants