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

feat: Allow block on tags_context and extra_context #920

Merged
merged 1 commit into from
Oct 16, 2019

Conversation

rivayama
Copy link
Contributor

This makes tags_context and extra_context block receivable and it defines a scope for the tags/extra.

Before:

posts.each do |post|
  Raven.tags_context(post_id: post.id)
  # do something
end
Raven.context.tags.delete(:post_id)

After:

posts.each do |post|
  Raven.tags_context(post_id: post.id) do
    # do something
  end
end

@HazAT HazAT merged commit 0b25744 into getsentry:master Oct 16, 2019
@HazAT
Copy link
Member

HazAT commented Oct 16, 2019

THX!

@tycooon
Copy link

tycooon commented Oct 17, 2019

Hi, I added a comment here: 0b25744. Please take a look.

UPD: Ah, I see that #931 is already created.

@philipbjorge
Copy link
Contributor

@rivayama -- Is there a specific reason that we didn't add this capability for user context?
Just wondering or if this is a good opportunity for me to make a PR 😉

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.

None yet

4 participants