feat(utils): Add add_remark functionality to Meta class#44884
Merged
AbhiPrasad merged 2 commits intomasterfrom Feb 23, 2023
Merged
feat(utils): Add add_remark functionality to Meta class#44884AbhiPrasad merged 2 commits intomasterfrom
add_remark functionality to Meta class#44884AbhiPrasad merged 2 commits intomasterfrom
Conversation
3 tasks
HazAT
approved these changes
Feb 21, 2023
jan-auer
approved these changes
Feb 21, 2023
Member
jan-auer
left a comment
There was a problem hiding this comment.
When using this, please consider to add a test that runs the final payload through renormalization to avoid deserialization issues.
Comment on lines
+10
to
+11
| range_start: Optional[int] | ||
| range_end: Optional[int] |
Member
There was a problem hiding this comment.
This range is in bytes, not UTF8 codepoints. It could be worth pointing this out explicitly.
Contributor
Author
There was a problem hiding this comment.
Made these changes in a follow up PR - will point them out there.
AbhiPrasad
added a commit
that referenced
this pull request
Feb 24, 2023
…45030) Continuing our work from #44884, this PR takes the `add_remark` implementation from there and uses it to add a substitution remark every time we process a react minified event message. In addition, as per feedback, we also test to make sure that store normalization works properly with this new set up.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
In preparation for the work in #44877, add the ability to add remarks via a Meta class utility, similar to what is in Relay: https://github.com/getsentry/relay/blob/master/relay-general/src/types/meta.rs#L38.
With this change it might seem that we should refactor the class so that
add_errorandadd_remarkare no longer duplicated. I didn't think this was worth the time investment, as the class is actually not used anywhere at the momentThe tests are fairly basic. I figured it's not worth the time to duplicate the
add_errortests, we can always come back to this if there is more usage of the func. In addition, in the next PR we'll be leveragingadd_remarkin the JS processor, so more tests will come to check to robustness of the method.After this gets merged in, the next step is to update the JS processor to add this remark, so that the UI can then tell that the react minified errors processor replaced an exception value.
I'm half of mind to just throw this in Relay, because the processor code isn't actually that complicated, but probably not worth the time investment.