-
-
Notifications
You must be signed in to change notification settings - Fork 276
replay: add sensitive content widget to default masking #2989
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2989 +/- ##
==========================================
+ Coverage 87.02% 89.21% +2.19%
==========================================
Files 134 99 -35
Lines 4964 3423 -1541
==========================================
- Hits 4320 3054 -1266
+ Misses 644 369 -275 ☔ View full report in Codecov by Sentry. |
iOS Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 6f47800 | 1247.52 ms | 1259.37 ms | 11.85 ms |
| 6bcdc99 | 1257.16 ms | 1264.96 ms | 7.79 ms |
| 765aa8b | 1259.09 ms | 1269.90 ms | 10.82 ms |
| 73a3c38 | 1263.37 ms | 1277.90 ms | 14.53 ms |
| 0fb45d0 | 1273.24 ms | 1286.44 ms | 13.19 ms |
| aeb02f2 | 1244.29 ms | 1256.55 ms | 12.26 ms |
| f761369 | 1261.69 ms | 1277.82 ms | 16.12 ms |
| 0fb3800 | 1256.60 ms | 1266.28 ms | 9.68 ms |
| e04b24b | 1230.22 ms | 1233.90 ms | 3.67 ms |
| 1f639ee | 1252.43 ms | 1257.82 ms | 5.38 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 6f47800 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
| 6bcdc99 | 5.53 MiB | 6.00 MiB | 479.95 KiB |
| 765aa8b | 7.86 MiB | 9.44 MiB | 1.58 MiB |
| 73a3c38 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
| 0fb45d0 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
| aeb02f2 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
| f761369 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
| 0fb3800 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
| e04b24b | 5.53 MiB | 6.00 MiB | 480.00 KiB |
| 1f639ee | 5.53 MiB | 6.00 MiB | 479.95 KiB |
Previous results on branch: replay/add-sensitive-content
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 088cf62 | 1266.14 ms | 1285.35 ms | 19.20 ms |
| 0c59077 | 1252.77 ms | 1271.38 ms | 18.61 ms |
| 20657ad | 1271.84 ms | 1285.37 ms | 13.53 ms |
| e38ab52 | 1245.25 ms | 1243.41 ms | -1.84 ms |
| 1f8bf63 | 1250.02 ms | 1271.02 ms | 21.00 ms |
| 5ce2839 | 1271.55 ms | 1281.62 ms | 10.07 ms |
| 32e3fc4 | 1270.65 ms | 1284.69 ms | 14.04 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 088cf62 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
| 0c59077 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
| 20657ad | 7.86 MiB | 9.44 MiB | 1.58 MiB |
| e38ab52 | 5.53 MiB | 6.00 MiB | 480.93 KiB |
| 1f8bf63 | 7.86 MiB | 9.54 MiB | 1.69 MiB |
| 5ce2839 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
| 32e3fc4 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
Android Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 3615e19 | 468.38 ms | 504.71 ms | 36.33 ms |
| fd88186 | 422.07 ms | 469.10 ms | 47.03 ms |
| a69a51f | 437.18 ms | 450.60 ms | 13.42 ms |
| 2d34233 | 470.54 ms | 558.90 ms | 88.36 ms |
| 7b21e8b | 467.74 ms | 466.24 ms | -1.50 ms |
| 2cf9161 | 454.12 ms | 512.67 ms | 58.55 ms |
| c26ed0a | 465.52 ms | 476.38 ms | 10.86 ms |
| 93b7728 | 475.28 ms | 489.13 ms | 13.86 ms |
| dbd526b | 504.88 ms | 569.02 ms | 64.15 ms |
| 2b5e090 | 437.21 ms | 467.14 ms | 29.93 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 3615e19 | 6.54 MiB | 7.70 MiB | 1.16 MiB |
| fd88186 | 13.93 MiB | 15.00 MiB | 1.06 MiB |
| a69a51f | 13.93 MiB | 15.06 MiB | 1.13 MiB |
| 2d34233 | 6.54 MiB | 7.55 MiB | 1.01 MiB |
| 7b21e8b | 13.93 MiB | 15.00 MiB | 1.06 MiB |
| 2cf9161 | 6.54 MiB | 7.70 MiB | 1.16 MiB |
| c26ed0a | 13.93 MiB | 14.93 MiB | 1.00 MiB |
| 93b7728 | 6.54 MiB | 7.69 MiB | 1.15 MiB |
| dbd526b | 6.54 MiB | 7.69 MiB | 1.15 MiB |
| 2b5e090 | 13.93 MiB | 15.06 MiB | 1.13 MiB |
Previous results on branch: replay/add-sensitive-content
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 0c59077 | 479.96 ms | 570.00 ms | 90.04 ms |
| 088cf62 | 462.73 ms | 544.39 ms | 81.65 ms |
| 32e3fc4 | 468.26 ms | 538.44 ms | 70.18 ms |
| e38ab52 | 444.62 ms | 429.09 ms | -15.53 ms |
| 5ce2839 | 462.72 ms | 519.61 ms | 56.89 ms |
| 1f8bf63 | 493.32 ms | 568.69 ms | 75.37 ms |
| 20657ad | 514.06 ms | 607.15 ms | 93.09 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 0c59077 | 6.54 MiB | 7.70 MiB | 1.16 MiB |
| 088cf62 | 6.54 MiB | 7.70 MiB | 1.16 MiB |
| 32e3fc4 | 6.54 MiB | 7.70 MiB | 1.16 MiB |
| e38ab52 | 13.93 MiB | 15.00 MiB | 1.06 MiB |
| 5ce2839 | 6.54 MiB | 7.69 MiB | 1.15 MiB |
| 1f8bf63 | 6.54 MiB | 7.70 MiB | 1.17 MiB |
| 20657ad | 6.54 MiB | 7.70 MiB | 1.16 MiB |
🚨 Detected changes in high risk code 🚨High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:
|
|
|
||
| ### Features | ||
|
|
||
| - Add [SensitiveContent](https://main-api.flutter.dev/flutter/widgets/SensitiveContent-class.html) widget to default masking ([#2989](https://github.com/getsentry/sentry-dart/pull/2989)) |
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.
- 🚫 The changelog entry seems to be part of an already released section
## 9.8.0.
Consider moving the entry to the## Unreleasedsection, please.
| final minor = int.tryParse( | ||
| version.substring(dot + 1, nextDot == -1 ? version.length : nextDot)); | ||
|
|
||
| return major != null && |
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.
nit: Could do early returns when either major/minor is null. Also, do we do version check anywhere else? Then we could extract the version reading to a common place and only do the version check here, as we do both now.
| final dynamic dynWidget = widget; | ||
| final sensitivity = dynWidget.sensitivity; | ||
| // If the property exists, we assume this is the SensitiveContent widget. | ||
| assert(sensitivity is Enum); |
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.
Worth to double-check the cursor[bot] comment.
| final minor = int.tryParse( | ||
| version.substring(dot + 1, nextDot == -1 ? version.length : nextDot)); | ||
|
|
||
| if (major! > 3 || (major == 3 && minor! >= 33)) { |
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.
From above, if we create a helepr and test it popertly we can use it here instead of duplicating version parsing.
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.
ah sorry, I think those are leftovers of when I did the testing, I'll properly expose the function instead
| if (version == null) { | ||
| return []; | ||
| } | ||
| final dot = version.indexOf('.'); |
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.
Same here, duplicated logic for the third time.
📜 Description
Masks the
SensitiveContentwidget ootb for replay💡 Motivation and Context
Closes #2987
💚 How did you test it?
📝 Checklist
sendDefaultPiiis enabled🔮 Next steps