-
-
Notifications
You must be signed in to change notification settings - Fork 354
fix: ignoreErrors now works on Native #4948
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
Merged
Merged
Conversation
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
Contributor
Android (legacy) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 472960b | 418.84 ms | 405.38 ms | -13.46 ms |
| 3c99746 | 399.51 ms | 429.09 ms | 29.58 ms |
| f870f2d | 444.67 ms | 449.62 ms | 4.95 ms |
| 7eff2d7 | 420.64 ms | 401.86 ms | -18.78 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 472960b | 17.75 MiB | 19.58 MiB | 1.83 MiB |
| 3c99746 | 17.75 MiB | 19.58 MiB | 1.83 MiB |
| f870f2d | 17.75 MiB | 19.58 MiB | 1.83 MiB |
| 7eff2d7 | 17.75 MiB | 19.60 MiB | 1.85 MiB |
Contributor
Android (new) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 3c99746+dirty | 400.65 ms | 399.59 ms | -1.06 ms |
| 7eff2d7+dirty | 393.13 ms | 426.77 ms | 33.65 ms |
| 472960b+dirty | 394.39 ms | 376.18 ms | -18.20 ms |
| f870f2d+dirty | 398.49 ms | 434.24 ms | 35.75 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 3c99746+dirty | 7.15 MiB | 8.34 MiB | 1.18 MiB |
| 7eff2d7+dirty | 7.15 MiB | 8.35 MiB | 1.20 MiB |
| 472960b+dirty | 7.15 MiB | 8.34 MiB | 1.18 MiB |
| f870f2d+dirty | 7.15 MiB | 8.34 MiB | 1.18 MiB |
Previous results on branch: lz/v7/ignore-errors
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 628a490+dirty | 370.94 ms | 368.02 ms | -2.92 ms |
| 000340c+dirty | 388.30 ms | 394.09 ms | 5.79 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 628a490+dirty | 7.15 MiB | 8.35 MiB | 1.20 MiB |
| 000340c+dirty | 7.15 MiB | 8.35 MiB | 1.20 MiB |
Contributor
iOS (new) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 7eff2d7+dirty | 1224.84 ms | 1227.94 ms | 3.10 ms |
| 3c99746+dirty | 1227.65 ms | 1228.81 ms | 1.16 ms |
| 472960b+dirty | 1243.67 ms | 1233.57 ms | -10.11 ms |
| f870f2d+dirty | 1230.08 ms | 1238.88 ms | 8.80 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 7eff2d7+dirty | 3.19 MiB | 4.36 MiB | 1.17 MiB |
| 3c99746+dirty | 3.19 MiB | 4.35 MiB | 1.16 MiB |
| 472960b+dirty | 3.19 MiB | 4.36 MiB | 1.17 MiB |
| f870f2d+dirty | 3.19 MiB | 4.36 MiB | 1.17 MiB |
Previous results on branch: lz/v7/ignore-errors
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 628a490+dirty | 1224.94 ms | 1237.40 ms | 12.46 ms |
| 000340c+dirty | 1224.71 ms | 1221.85 ms | -2.86 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 628a490+dirty | 3.19 MiB | 4.36 MiB | 1.17 MiB |
| 000340c+dirty | 3.19 MiB | 4.36 MiB | 1.17 MiB |
Contributor
iOS (legacy) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 7eff2d7+dirty | 1225.34 ms | 1234.53 ms | 9.19 ms |
| 3c99746+dirty | 1215.12 ms | 1222.31 ms | 7.18 ms |
| 472960b+dirty | 1213.96 ms | 1222.58 ms | 8.62 ms |
| f870f2d+dirty | 1227.18 ms | 1232.30 ms | 5.12 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 7eff2d7+dirty | 2.63 MiB | 3.79 MiB | 1.16 MiB |
| 3c99746+dirty | 2.63 MiB | 3.78 MiB | 1.15 MiB |
| 472960b+dirty | 2.63 MiB | 3.79 MiB | 1.15 MiB |
| f870f2d+dirty | 2.63 MiB | 3.79 MiB | 1.15 MiB |
Previous results on branch: lz/v7/ignore-errors
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 628a490+dirty | 1223.83 ms | 1230.18 ms | 6.35 ms |
| 000340c+dirty | 1207.56 ms | 1210.43 ms | 2.87 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 628a490+dirty | 2.63 MiB | 3.79 MiB | 1.16 MiB |
| 000340c+dirty | 2.63 MiB | 3.79 MiB | 1.16 MiB |
…lit regex from string matches
lucas-zimerman
commented
Jun 27, 2025
antonis
reviewed
Jun 27, 2025
antonis
reviewed
Jun 27, 2025
antonis
approved these changes
Jun 27, 2025
Contributor
antonis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work @lucas-zimerman 🙇
The changes LGTM and work as expected 🎉
Just added two minor suggestions.
Co-authored-by: Antonis Lilis <antonis.lilis@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
📢 Type of change
📜 Description
Before this change, ignoreErrors was only applied to JavaScript errors. With this PR, Native errors will also be able to be filtered by ignoreErrors.
Since different SDKs apply different approaches to ignoreErrors, I have unified them by following what the JavaScript SDK does.
Usage:
on JS SDK, strings are compared with contains, making it able to seach for substrings, so
1234will ignore the errorthis is an error 1234.Regex filters will continue with the same behaviour on all platforms.
OS Specific changes:
Android
It has a build in ignoreError filter, but string errors doesn't compare substrings but the entire string, making the
1234example invalid. To fix it, string asserts are transformed into Regex by doing the pattern.*\Q this is my string\E.*, making it behave like the JavaScript contains.iOS
Since there are no ignoreErrors, we apply those filters on the beforeSend callback, regex errors are filtered by regex objects where string filters behave like the JS implementation.
💡 Motivation and Context
Fixes #4924
💚 How did you test it?
Unit Tests, sample app
📝 Checklist
sendDefaultPIIis enabled🔮 Next steps