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

@st0012 st0012 added this to the 4.8.1 milestone Nov 19, 2021
@st0012 st0012 self-assigned this Nov 19, 2021
@st0012 st0012 added this to In progress in 4.x via automation Nov 19, 2021
@st0012 st0012 merged commit 23c66f5 into master Nov 19, 2021
4.x automation moved this from In progress to Done Nov 19, 2021
@st0012 st0012 deleted the fix-#1619 branch November 19, 2021 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
4.x
  
Done
Development

Successfully merging this pull request may close these issues.

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