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

feat: replay orientation change #2462

Merged
merged 23 commits into from
Dec 9, 2024
Merged

feat: replay orientation change #2462

merged 23 commits into from
Dec 9, 2024

Conversation

vaind
Copy link
Collaborator

@vaind vaind commented Dec 2, 2024

📜 Description

In order to support resizing and orientation change on Android, we needed to refactor parts of the code and fix a couple of issues with handling replay stops/starts coming from the native layer.

Note: do not merge yet, while the PR is ready for review because I don't expect major changes, it's not going to work without getsentry/sentry-java#3951 resolved

💡 Motivation and Context

closes #2438

💚 How did you test it?

Manually & updated some 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

  • Quality settings
  • pause/resume

Copy link
Contributor

github-actions bot commented Dec 2, 2024

🚨 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:

  • flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt

Copy link
Contributor

github-actions bot commented Dec 2, 2024

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 2b7d7f8

github-actions[bot]

This comment was marked as resolved.

Copy link

codecov bot commented Dec 2, 2024

Codecov Report

Attention: Patch coverage is 90.05848% with 17 lines in your changes missing coverage. Please review.

Project coverage is 91.72%. Comparing base (b6bb5b4) to head (2b7d7f8).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
flutter/lib/src/replay/scheduled_recorder.dart 89.33% 8 Missing ⚠️
...r/lib/src/native/java/android_replay_recorder.dart 83.33% 3 Missing ⚠️
flutter/lib/src/screenshot/recorder.dart 70.00% 3 Missing ⚠️
flutter/lib/src/native/c/sentry_native.dart 33.33% 2 Missing ⚠️
flutter/lib/src/native/sentry_native_channel.dart 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2462      +/-   ##
==========================================
+ Coverage   87.00%   91.72%   +4.72%     
==========================================
  Files         261       87     -174     
  Lines        9249     2986    -6263     
==========================================
- Hits         8047     2739    -5308     
+ Misses       1202      247     -955     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Dec 2, 2024

Android Performance metrics 🚀

  Plain With Sentry Diff
Startup time 482.35 ms 528.45 ms 46.10 ms
Size 6.49 MiB 7.57 MiB 1.08 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
affcf07 446.19 ms 476.32 ms 30.13 ms
2331d89 352.45 ms 417.34 ms 64.89 ms
7fd33d3 452.90 ms 506.75 ms 53.85 ms
f9d18f3 430.94 ms 497.59 ms 66.65 ms
af2d175 279.08 ms 312.37 ms 33.29 ms
3334ac1 303.98 ms 366.65 ms 62.67 ms
c732386 316.84 ms 390.62 ms 73.78 ms
e82709a 361.18 ms 423.50 ms 62.32 ms
5baa201 389.26 ms 462.83 ms 73.57 ms
03e4c9b 410.34 ms 493.20 ms 82.86 ms

App size

Revision Plain With Sentry Diff
affcf07 6.52 MiB 7.59 MiB 1.06 MiB
2331d89 5.94 MiB 6.96 MiB 1.02 MiB
7fd33d3 6.49 MiB 7.56 MiB 1.08 MiB
f9d18f3 6.15 MiB 7.13 MiB 1000.49 KiB
af2d175 5.94 MiB 6.92 MiB 1001.83 KiB
3334ac1 6.06 MiB 7.03 MiB 993.54 KiB
c732386 6.26 MiB 7.20 MiB 958.78 KiB
e82709a 6.34 MiB 7.29 MiB 970.37 KiB
5baa201 6.35 MiB 7.33 MiB 1005.56 KiB
03e4c9b 6.35 MiB 7.42 MiB 1.07 MiB

Previous results on branch: feat/replay-resizing

Startup times

Revision Plain With Sentry Diff
87d393d 473.59 ms 535.48 ms 61.89 ms
48014cc 447.48 ms 500.84 ms 53.36 ms
e8c067c 448.28 ms 468.45 ms 20.17 ms
b1cd9a3 507.06 ms 531.45 ms 24.39 ms
802ce2c 437.40 ms 459.64 ms 22.24 ms
20e7088 728.85 ms 753.35 ms 24.49 ms
4080ee5 340.65 ms 376.02 ms 35.37 ms
e5df0cc 489.96 ms 546.06 ms 56.10 ms
96ece56 499.15 ms 554.86 ms 55.71 ms
accab5a 466.63 ms 483.79 ms 17.16 ms

App size

Revision Plain With Sentry Diff
87d393d 6.49 MiB 7.56 MiB 1.07 MiB
48014cc 6.49 MiB 7.56 MiB 1.08 MiB
e8c067c 6.49 MiB 7.56 MiB 1.07 MiB
b1cd9a3 6.49 MiB 7.57 MiB 1.08 MiB
802ce2c 6.49 MiB 7.56 MiB 1.07 MiB
20e7088 6.49 MiB 7.57 MiB 1.08 MiB
4080ee5 6.49 MiB 7.57 MiB 1.08 MiB
e5df0cc 6.49 MiB 7.56 MiB 1.07 MiB
96ece56 6.49 MiB 7.57 MiB 1.08 MiB
accab5a 6.49 MiB 7.57 MiB 1.08 MiB

Copy link
Contributor

github-actions bot commented Dec 2, 2024

iOS Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1259.54 ms 1281.02 ms 21.48 ms
Size 8.38 MiB 9.78 MiB 1.40 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
90a08ea 1260.45 ms 1285.24 ms 24.80 ms
e239c83 1248.40 ms 1269.28 ms 20.89 ms
c9d3212 1231.84 ms 1237.40 ms 5.57 ms
6aab859 1245.14 ms 1247.59 ms 2.45 ms
e0f3acf 1238.21 ms 1263.54 ms 25.34 ms
f3a18f2 1246.86 ms 1268.00 ms 21.14 ms
04bd9e6 1230.78 ms 1250.71 ms 19.94 ms
5aba417 1265.31 ms 1287.90 ms 22.59 ms
64af39c 1243.98 ms 1257.69 ms 13.71 ms
5603ab2 1268.47 ms 1280.73 ms 12.26 ms

App size

Revision Plain With Sentry Diff
90a08ea 8.38 MiB 9.73 MiB 1.36 MiB
e239c83 8.38 MiB 9.74 MiB 1.36 MiB
c9d3212 8.29 MiB 9.39 MiB 1.10 MiB
6aab859 8.29 MiB 9.36 MiB 1.07 MiB
e0f3acf 8.38 MiB 9.78 MiB 1.40 MiB
f3a18f2 8.38 MiB 9.75 MiB 1.37 MiB
04bd9e6 8.33 MiB 9.61 MiB 1.27 MiB
5aba417 8.16 MiB 9.17 MiB 1.01 MiB
64af39c 8.28 MiB 9.34 MiB 1.06 MiB
5603ab2 8.15 MiB 9.12 MiB 990.57 KiB

Previous results on branch: feat/replay-resizing

Startup times

Revision Plain With Sentry Diff
802ce2c 1226.84 ms 1248.48 ms 21.64 ms
e5df0cc 1251.75 ms 1274.59 ms 22.84 ms
5d2ba47 1244.49 ms 1273.50 ms 29.01 ms
ec3c227 1264.06 ms 1283.98 ms 19.92 ms
b1cd9a3 1247.67 ms 1272.52 ms 24.85 ms
96ece56 1247.46 ms 1264.56 ms 17.10 ms
e8c067c 1254.31 ms 1270.55 ms 16.24 ms
87d393d 1241.73 ms 1261.19 ms 19.45 ms
845d266 1241.94 ms 1270.73 ms 28.80 ms
20e7088 1254.83 ms 1277.21 ms 22.38 ms

App size

Revision Plain With Sentry Diff
802ce2c 8.38 MiB 9.78 MiB 1.40 MiB
e5df0cc 8.38 MiB 9.78 MiB 1.40 MiB
5d2ba47 8.38 MiB 9.78 MiB 1.40 MiB
ec3c227 8.38 MiB 9.78 MiB 1.40 MiB
b1cd9a3 8.38 MiB 9.78 MiB 1.40 MiB
96ece56 8.38 MiB 9.78 MiB 1.40 MiB
e8c067c 8.38 MiB 9.78 MiB 1.40 MiB
87d393d 8.38 MiB 9.78 MiB 1.40 MiB
845d266 8.38 MiB 9.78 MiB 1.40 MiB
20e7088 8.38 MiB 9.78 MiB 1.40 MiB

@vaind vaind marked this pull request as ready for review December 4, 2024 11:12
@vaind vaind changed the title feat/replay resizing feat: replay orientation change Dec 4, 2024
@vaind vaind merged commit 7045efc into main Dec 9, 2024
51 checks passed
@vaind vaind deleted the feat/replay-resizing branch December 9, 2024 12:48
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.

Improve replay sizing on Android
2 participants