-
-
Notifications
You must be signed in to change notification settings - Fork 276
Mark file sync spans run in the main isolate with blocked_main_thread
#3270
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3270 +/- ##
==========================================
+ Coverage 87.82% 88.96% +1.14%
==========================================
Files 294 281 -13
Lines 10143 9805 -338
==========================================
- Hits 8908 8723 -185
+ Misses 1235 1082 -153 ☔ View full report in Codecov by Sentry. |
Android Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
0fb3800 | 465.64 ms | 536.77 ms | 71.13 ms |
81f83eb | 471.40 ms | 522.14 ms | 50.74 ms |
93b7728 | 475.28 ms | 489.13 ms | 13.86 ms |
e04b24b | 504.72 ms | 516.43 ms | 11.71 ms |
2d34233 | 470.54 ms | 558.90 ms | 88.36 ms |
640ad0c | 466.00 ms | 552.67 ms | 86.67 ms |
4298701 | 524.40 ms | 633.30 ms | 108.90 ms |
7cfee3b | 498.78 ms | 516.98 ms | 18.20 ms |
4481076 | 484.08 ms | 505.70 ms | 21.61 ms |
54acf91 | 487.24 ms | 529.60 ms | 42.36 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
0fb3800 | 6.54 MiB | 7.69 MiB | 1.15 MiB |
81f83eb | 6.54 MiB | 7.69 MiB | 1.15 MiB |
93b7728 | 6.54 MiB | 7.69 MiB | 1.15 MiB |
e04b24b | 13.93 MiB | 15.00 MiB | 1.06 MiB |
2d34233 | 6.54 MiB | 7.55 MiB | 1.01 MiB |
640ad0c | 6.54 MiB | 7.69 MiB | 1.15 MiB |
4298701 | 6.54 MiB | 7.71 MiB | 1.17 MiB |
7cfee3b | 6.54 MiB | 7.70 MiB | 1.17 MiB |
4481076 | 6.54 MiB | 7.69 MiB | 1.15 MiB |
54acf91 | 6.54 MiB | 7.70 MiB | 1.17 MiB |
Previous results on branch: enha/mark-scncy-method-spans-on-main-isolate
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
55214b3 | 447.58 ms | 443.88 ms | -3.70 ms |
f4d9e3a | 487.98 ms | 478.63 ms | -9.35 ms |
8305f60 | 457.54 ms | 468.00 ms | 10.46 ms |
6780d71 | 420.98 ms | 433.34 ms | 12.36 ms |
15fdf60 | 437.92 ms | 426.57 ms | -11.35 ms |
fe27ab8 | 424.98 ms | 445.18 ms | 20.20 ms |
cd6efd2 | 503.06 ms | 493.85 ms | -9.21 ms |
d005357 | 437.94 ms | 470.70 ms | 32.76 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
55214b3 | 13.93 MiB | 15.00 MiB | 1.06 MiB |
f4d9e3a | 13.93 MiB | 15.00 MiB | 1.06 MiB |
8305f60 | 13.93 MiB | 15.06 MiB | 1.13 MiB |
6780d71 | 13.93 MiB | 15.00 MiB | 1.06 MiB |
15fdf60 | 13.93 MiB | 15.00 MiB | 1.06 MiB |
fe27ab8 | 13.93 MiB | 15.00 MiB | 1.06 MiB |
cd6efd2 | 13.93 MiB | 15.00 MiB | 1.06 MiB |
d005357 | 13.93 MiB | 15.00 MiB | 1.06 MiB |
iOS Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
192b44c | 1269.08 ms | 1275.52 ms | 6.44 ms |
c1e775e | 1263.08 ms | 1275.32 ms | 12.24 ms |
79f6b41 | 1269.33 ms | 1279.71 ms | 10.38 ms |
eca355d | 1238.39 ms | 1266.98 ms | 28.59 ms |
de377fd | 1252.28 ms | 1254.76 ms | 2.48 ms |
c8596a6 | 1234.11 ms | 1241.19 ms | 7.08 ms |
e2d675d | 1238.48 ms | 1242.76 ms | 4.28 ms |
793f4dc | 1262.50 ms | 1282.35 ms | 19.85 ms |
81f83eb | 1259.53 ms | 1273.39 ms | 13.86 ms |
4481076 | 1256.48 ms | 1266.64 ms | 10.17 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
192b44c | 5.53 MiB | 5.96 MiB | 444.33 KiB |
c1e775e | 20.70 MiB | 22.46 MiB | 1.75 MiB |
79f6b41 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
eca355d | 7.86 MiB | 9.44 MiB | 1.58 MiB |
de377fd | 20.71 MiB | 22.43 MiB | 1.73 MiB |
c8596a6 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
e2d675d | 7.86 MiB | 9.44 MiB | 1.58 MiB |
793f4dc | 7.86 MiB | 9.44 MiB | 1.58 MiB |
81f83eb | 7.86 MiB | 9.44 MiB | 1.58 MiB |
4481076 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
Previous results on branch: enha/mark-scncy-method-spans-on-main-isolate
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
fe27ab8 | 1252.94 ms | 1246.31 ms | -6.63 ms |
8305f60 | 1259.24 ms | 1264.04 ms | 4.80 ms |
cd6efd2 | 1253.13 ms | 1256.17 ms | 3.03 ms |
15fdf60 | 1251.14 ms | 1249.26 ms | -1.88 ms |
6780d71 | 1259.80 ms | 1257.65 ms | -2.14 ms |
f4d9e3a | 1256.13 ms | 1249.04 ms | -7.08 ms |
55214b3 | 1261.92 ms | 1263.49 ms | 1.57 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
fe27ab8 | 5.53 MiB | 6.00 MiB | 481.98 KiB |
8305f60 | 5.53 MiB | 6.01 MiB | 487.66 KiB |
cd6efd2 | 5.53 MiB | 6.00 MiB | 481.93 KiB |
15fdf60 | 5.53 MiB | 6.00 MiB | 482.11 KiB |
6780d71 | 5.53 MiB | 6.00 MiB | 481.99 KiB |
f4d9e3a | 5.53 MiB | 6.00 MiB | 481.93 KiB |
55214b3 | 5.53 MiB | 6.00 MiB | 481.94 KiB |
packages/flutter/lib/src/integrations/thread_info_integration.dart
Outdated
Show resolved
Hide resolved
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.
looks good!
makes me think, I think we should spec out a bit when to use SDK lifecycle hooks vs event processor - currently it's a bit unclear when it's better to use which
We could have achieved the same with event processor for example, wdyt
// Check if we're on the main isolate by looking at thread name | ||
if (data['sync'] == true && | ||
data[SpanDataConvention.threadName] == 'main') { | ||
span.setData('blocked_main_thread', true); |
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.
let's add blocked_main_thread
to SpanDataConvention
as well
# Conflicts: # packages/flutter/lib/src/integrations/thread_info_integration.dart
@buenaflor We are mutating span data, which is currently only possible for un-finished spans, as enforced by the SDK. Thats why using the lifecycle hook was the straight forward thing to do here. But generally it could also have been an event (transaction) processor. @override
void setData(String key, value) {
if (finished) {
return; // Early return - no modification allowed
}
_data[key] = value;
} |
@buenaflor Created a file span manually (the ones internally would not take so long) with 150ms duration with DSN set to one of my sample apps. Detection works. ![]() |
📜 Description
Mark file sync spans run in the main isolate with
blocked_main_thread
💡 Motivation and Context
Closes #1727
💚 How did you test it?
Unit tests
📝 Checklist
sendDefaultPii
is enabled