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

Merge context with the same key instead of replacing the old value. #1621

Merged
merged 3 commits into from
Nov 19, 2021

Conversation

st0012
Copy link
Collaborator

@st0012 st0012 commented Nov 19, 2021

Before:

Sentry.set_context(:character, { name: "John" })
Sentry.set_context(:character, { age: 25 })
p Sentry.get_current_scope.contexts[:character] #=> {:age=>25}

After:

Sentry.set_context(:character, { name: "John" })
Sentry.set_context(:character, { age: 25 })
p Sentry.get_current_scope.contexts[:character] #=> {:age=>25, :name=>"John"}

Closes #1619

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

Successfully merging this pull request may close these issues.

Should set_context with the same context name clobber existing values?
2 participants