-
-
Notifications
You must be signed in to change notification settings - Fork 239
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
Feat/only send debug images referenced in the stacktrace for events #2329
base: main
Are you sure you want to change the base?
Feat/only send debug images referenced in the stacktrace for events #2329
Conversation
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2329 +/- ##
==========================================
+ Coverage 85.06% 85.89% +0.83%
==========================================
Files 257 81 -176
Lines 9191 2872 -6319
==========================================
- Hits 7818 2467 -5351
+ Misses 1373 405 -968 ☔ View full report in Codecov by Sentry. |
@buenaflor any ideas, what would be the best way to test this? |
Android Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
e5b744f | 302.70 ms | 342.17 ms | 39.47 ms |
0ac1eed | 370.60 ms | 441.54 ms | 70.94 ms |
90a08ea | 477.25 ms | 534.10 ms | 56.85 ms |
0db91cc | 327.85 ms | 387.31 ms | 59.46 ms |
061fed2 | 434.11 ms | 506.49 ms | 72.38 ms |
4829ad3 | 381.55 ms | 455.45 ms | 73.90 ms |
519423f | 357.00 ms | 415.77 ms | 58.77 ms |
ddc97ad | 331.45 ms | 384.06 ms | 52.61 ms |
e3ef570 | 389.71 ms | 459.16 ms | 69.45 ms |
2d3b03d | 309.53 ms | 353.40 ms | 43.87 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
e5b744f | 6.06 MiB | 7.09 MiB | 1.03 MiB |
0ac1eed | 6.06 MiB | 7.03 MiB | 990.44 KiB |
90a08ea | 6.49 MiB | 7.55 MiB | 1.06 MiB |
0db91cc | 5.94 MiB | 6.95 MiB | 1.01 MiB |
061fed2 | 6.52 MiB | 7.59 MiB | 1.06 MiB |
4829ad3 | 6.33 MiB | 7.26 MiB | 943.11 KiB |
519423f | 6.06 MiB | 7.03 MiB | 989.24 KiB |
ddc97ad | 6.16 MiB | 7.14 MiB | 1003.75 KiB |
e3ef570 | 6.33 MiB | 7.26 MiB | 950.38 KiB |
2d3b03d | 6.06 MiB | 7.09 MiB | 1.03 MiB |
Previous results on branch: feat/only-send-debug-images-referenced-in-the-stacktrace-for-events
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
fa97c64 | 472.71 ms | 530.63 ms | 57.92 ms |
18890a0 | 500.08 ms | 537.72 ms | 37.64 ms |
bad0c67 | 463.64 ms | 517.10 ms | 53.46 ms |
ad79f89 | 503.92 ms | 507.65 ms | 3.74 ms |
0fef294 | 469.37 ms | 509.82 ms | 40.45 ms |
2cc98f6 | 424.36 ms | 472.90 ms | 48.54 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
fa97c64 | 6.49 MiB | 7.56 MiB | 1.07 MiB |
18890a0 | 6.49 MiB | 7.57 MiB | 1.08 MiB |
bad0c67 | 6.49 MiB | 7.56 MiB | 1.07 MiB |
ad79f89 | 6.49 MiB | 7.56 MiB | 1.07 MiB |
0fef294 | 6.49 MiB | 7.56 MiB | 1.07 MiB |
2cc98f6 | 6.49 MiB | 7.57 MiB | 1.08 MiB |
iOS Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
333903e | 1251.15 ms | 1270.21 ms | 19.06 ms |
d53c6fa | 1254.86 ms | 1270.83 ms | 15.97 ms |
b66cc27 | 1249.64 ms | 1275.57 ms | 25.94 ms |
bf8d36c | 1238.33 ms | 1258.71 ms | 20.38 ms |
ffae3e3 | 1215.82 ms | 1238.49 ms | 22.67 ms |
6fedcab | 1242.33 ms | 1269.66 ms | 27.33 ms |
ba9c106 | 1241.76 ms | 1265.15 ms | 23.40 ms |
bc29768 | 1247.25 ms | 1268.63 ms | 21.38 ms |
a4c4f8c | 1217.77 ms | 1245.88 ms | 28.11 ms |
3e5078c | 1239.73 ms | 1248.69 ms | 8.96 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
333903e | 8.10 MiB | 9.16 MiB | 1.06 MiB |
d53c6fa | 8.29 MiB | 9.39 MiB | 1.10 MiB |
b66cc27 | 8.38 MiB | 9.74 MiB | 1.36 MiB |
bf8d36c | 8.38 MiB | 9.74 MiB | 1.36 MiB |
ffae3e3 | 8.28 MiB | 9.33 MiB | 1.05 MiB |
6fedcab | 8.32 MiB | 9.50 MiB | 1.18 MiB |
ba9c106 | 8.32 MiB | 9.38 MiB | 1.06 MiB |
bc29768 | 8.32 MiB | 9.38 MiB | 1.05 MiB |
a4c4f8c | 8.38 MiB | 9.74 MiB | 1.36 MiB |
3e5078c | 8.28 MiB | 9.34 MiB | 1.06 MiB |
Previous results on branch: feat/only-send-debug-images-referenced-in-the-stacktrace-for-events
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
ad79f89 | 1258.51 ms | 1281.02 ms | 22.51 ms |
fa97c64 | 1264.96 ms | 1289.26 ms | 24.30 ms |
bad0c67 | 1252.14 ms | 1262.27 ms | 10.13 ms |
18890a0 | 1252.71 ms | 1274.23 ms | 21.51 ms |
0fef294 | 1228.18 ms | 1237.88 ms | 9.69 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
ad79f89 | 8.38 MiB | 9.75 MiB | 1.37 MiB |
fa97c64 | 8.38 MiB | 9.74 MiB | 1.36 MiB |
bad0c67 | 8.38 MiB | 9.74 MiB | 1.36 MiB |
18890a0 | 8.38 MiB | 9.75 MiB | 1.37 MiB |
0fef294 | 8.38 MiB | 9.74 MiB | 1.36 MiB |
…e-for-events' of https://github.com/getsentry/sentry-dart into feat/only-send-debug-images-referenced-in-the-stacktrace-for-events * 'feat/only-send-debug-images-referenced-in-the-stacktrace-for-events' of https://github.com/getsentry/sentry-dart: Fix TTID timing issue (#2326) fix: dart2wasm test (#2327) Deprecate: metrics api (#2312)
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.
I took a quick look and fixed it locally. here's several things that went wrong:
- platform channels do not support
Set
, read here about the supported types, which means we need to useList
to pass the instruction addresses from flutter to native. We can continue using sets when parsing the addresses but when communicating between platform layers these need to be converted toList
. generally this may be something that we can improve for type safety when interacting through platform channels. I was surprised that this didn't trigger any error or warning UInt64(instructionAddr)
is not correct because the base it uses to convert the String is base 10 but the instruction addresses we are dealing with are hex so we need to adjust the radix/base to 16 =>UInt64(instructionAddr, radix: 16)
but this won't still work because the instruction addresses we pass in contain the0x
prefix which we also need to remove before we convert it toUInt64
- In the native channel
loadDebugImages
function you changedMap<dynamic, dynamic>
toMap<dynamic, Set<String>>
which doesn't work because DebugMeta fields won't match this - if the debug images that we parsed from the stacktrace is empty, we should always return all debug images with
PrivateSentrySDKOnly.getDebugImages()
. This did not work because it was only triggered by the condition if the passed instruction addresses are null or empty and not if the parsed images afterwards are empty
Co-authored-by: Giancarlo Buenaflor <[email protected]>
Co-authored-by: Giancarlo Buenaflor <[email protected]>
Co-authored-by: Giancarlo Buenaflor <[email protected]>
Co-authored-by: Giancarlo Buenaflor <[email protected]>
Co-authored-by: Giancarlo Buenaflor <[email protected]>
Co-authored-by: Giancarlo Buenaflor <[email protected]>
🚨 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:
|
as per this comment we will not use Instead we should use This PR is blocked until cocoa |
Pull request was converted to draft
Changed the |
final images = await channel | ||
.invokeListMethod<Map<dynamic, dynamic>>('loadImageList'); | ||
Set<String> instructionAddresses = {}; | ||
for (var frame in stackTrace.frames) { |
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.
for (var frame in stackTrace.frames) { | |
for (final frame in stackTrace.frames) { |
📜 Description
Instead of sending all debug images in case of errors, we only want to send the referenced debug images of the stacktrace to be sent.
💡 Motivation and Context
close #1755
💚 How did you test it?
build local with
flutter build macos --release --obfuscate --split-debug-info=./
and looked at sentry for the imageadresses. Then runflutter packages pub run sentry_dart_plugin
and looked for further info in sentry.📝 Checklist
sendDefaultPii
is enabled🔮 Next steps