bug-1920739: update sentry_sdk to 2.17.0 #6778
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This updates sentry_sdk to 2.17.0. In order to do that, we had to do two fundamental changes:
Switch
sentry_sdk.push_scope()
calls tosentry_sdk.new_scope()
which does roughly the same thing.Switch from using
sentry_sdk.add_extra()
tosentry_sdk.set_context()
.add_extra()
was nice in that it allowed us to add additional things to the sentry event payload that gave context to the error. We used this to capture the processor rule, ruleset, crash_id, signature generation rule, etc in an additive way.add_extra()
is deprecated and Sentry suggests to switch toset_context()
which is not an additive kind of thing. So now we have to set a new context section everywhere we set the context. That's a little annoying, but it'll be fine.I updated the code and tests accordingly.
I verified that the final context for a sentry event looks correct. Here's a screenshot of the
context
section in Kent for an error kicked up by a signature generation rule: