Skip to content
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

App start: Add spans to first transaction #2009

Merged
merged 31 commits into from
May 3, 2024
Merged

Conversation

buenaflor
Copy link
Contributor

@buenaflor buenaflor commented Apr 23, 2024

📜 Description

Adds app start spans to the first transaction

Added spans:

  • App launch to plugin registration -> measures app launch until the plugin is attached to the flutter engine
  • Main isolate setup -> measures time it takes from plugin registration until the earliest point dart is executed (as early as the flutter sdk is initialized)
  • First frame render -> measures time between main isolate dart code executing until the first frame

💡 Motivation and Context

mobile starfish

In combination with sentry navigator observer you'll be able to see app start traces in the app start module

💚 How did you test it?

Unit Tests

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPii is enabled
  • I updated the docs if needed
  • All tests passing
  • No breaking changes

🔮 Next steps

Copy link
Contributor

github-actions bot commented Apr 23, 2024

Android Performance metrics 🚀

  Plain With Sentry Diff
Startup time 499.43 ms 593.87 ms 94.44 ms
Size 6.33 MiB 7.30 MiB 987.83 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
d53c6fa 282.83 ms 344.00 ms 61.17 ms
ef31c7f 311.39 ms 359.33 ms 47.94 ms
eecbbca 324.37 ms 352.49 ms 28.12 ms
48adddf 353.96 ms 431.10 ms 77.14 ms
b0811cc 580.00 ms 675.69 ms 95.69 ms
89ea268 320.35 ms 377.68 ms 57.33 ms
ccc09e4 308.21 ms 357.74 ms 49.54 ms
d089990 361.67 ms 442.50 ms 80.83 ms
2331d89 352.45 ms 417.34 ms 64.89 ms
1a93825 347.31 ms 424.54 ms 77.23 ms

App size

Revision Plain With Sentry Diff
d53c6fa 6.16 MiB 7.14 MiB 1011.18 KiB
ef31c7f 6.06 MiB 7.09 MiB 1.03 MiB
eecbbca 5.94 MiB 6.89 MiB 975.78 KiB
48adddf 6.27 MiB 7.20 MiB 959.09 KiB
b0811cc 6.33 MiB 7.27 MiB 954.02 KiB
89ea268 6.06 MiB 7.03 MiB 989.24 KiB
ccc09e4 5.94 MiB 6.95 MiB 1.01 MiB
d089990 6.34 MiB 7.28 MiB 967.79 KiB
2331d89 5.94 MiB 6.96 MiB 1.02 MiB
1a93825 6.27 MiB 7.20 MiB 956.36 KiB

Previous results on branch: feat/app-start-improve

Startup times

Revision Plain With Sentry Diff
05c208c 401.73 ms 467.73 ms 66.00 ms
2bb3887 361.78 ms 416.31 ms 54.53 ms
6413e81 357.24 ms 370.44 ms 13.20 ms
62cb2be 357.40 ms 415.83 ms 58.42 ms
5ad308b 368.71 ms 434.94 ms 66.22 ms

App size

Revision Plain With Sentry Diff
05c208c 6.33 MiB 7.30 MiB 987.85 KiB
2bb3887 6.33 MiB 7.30 MiB 987.83 KiB
6413e81 6.33 MiB 7.30 MiB 987.83 KiB
62cb2be 6.33 MiB 7.30 MiB 987.82 KiB
5ad308b 6.34 MiB 7.28 MiB 966.36 KiB

Copy link
Contributor

github-actions bot commented Apr 23, 2024

iOS Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1247.69 ms 1257.26 ms 9.57 ms
Size 8.32 MiB 9.37 MiB 1.05 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
689d2fd 1257.71 ms 1265.16 ms 7.45 ms
bd37365 1236.22 ms 1243.27 ms 7.04 ms
8fa3934 1252.79 ms 1272.41 ms 19.62 ms
aed5947 1268.67 ms 1281.10 ms 12.43 ms
9d7e862 1236.88 ms 1258.62 ms 21.74 ms
1d47eb7 1212.57 ms 1222.00 ms 9.43 ms
eb1a7c1 1281.25 ms 1295.40 ms 14.15 ms
78eeed5 1259.33 ms 1270.14 ms 10.82 ms
e964e2b 1203.50 ms 1223.16 ms 19.66 ms
bdd1a23 1225.78 ms 1235.82 ms 10.04 ms

App size

Revision Plain With Sentry Diff
689d2fd 8.10 MiB 9.16 MiB 1.06 MiB
bd37365 8.28 MiB 9.34 MiB 1.06 MiB
8fa3934 8.09 MiB 9.07 MiB 1000.86 KiB
aed5947 8.16 MiB 9.17 MiB 1.01 MiB
9d7e862 8.32 MiB 9.38 MiB 1.05 MiB
1d47eb7 8.29 MiB 9.39 MiB 1.09 MiB
eb1a7c1 8.15 MiB 9.13 MiB 1000.10 KiB
78eeed5 8.29 MiB 9.38 MiB 1.09 MiB
e964e2b 8.32 MiB 9.38 MiB 1.06 MiB
bdd1a23 8.29 MiB 9.39 MiB 1.10 MiB

Previous results on branch: feat/app-start-improve

Startup times

Revision Plain With Sentry Diff
2bb3887 1231.44 ms 1239.15 ms 7.71 ms
5ad308b 1244.71 ms 1267.75 ms 23.04 ms
05c208c 1247.43 ms 1264.23 ms 16.80 ms
62cb2be 1243.78 ms 1266.17 ms 22.39 ms

App size

Revision Plain With Sentry Diff
2bb3887 8.32 MiB 9.43 MiB 1.10 MiB
5ad308b 8.32 MiB 9.40 MiB 1.08 MiB
05c208c 8.32 MiB 9.40 MiB 1.08 MiB
62cb2be 8.32 MiB 9.37 MiB 1.05 MiB

@buenaflor buenaflor marked this pull request as ready for review April 24, 2024 12:54
@buenaflor buenaflor changed the title App start: Add spans when navigator observer is present App start: Add spans to first transaction Apr 24, 2024
@buenaflor buenaflor marked this pull request as draft April 25, 2024 13:34
@buenaflor buenaflor marked this pull request as ready for review April 29, 2024 08:31
@buenaflor buenaflor requested a review from stefanosiano May 3, 2024 15:37
Copy link
Member

@stefanosiano stefanosiano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@buenaflor buenaflor merged commit 6575860 into main May 3, 2024
41 checks passed
@buenaflor buenaflor deleted the feat/app-start-improve branch May 3, 2024 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants