sentry-dart icon indicating copy to clipboard operation
sentry-dart copied to clipboard

Flutter replay for Android [waiting for upstream SDK release]

Open vaind opened this issue 1 year ago • 5 comments

:scroll: Description

Adds session replay support for Flutter (Android)

  • [x] automatic session replay
  • [x] native errors replay
  • [x] dart errors replay
  • [x] unit test coverage
  • [ ] changelog entry (#skip-changelog until then)
  • [ ] wait for sentry-java release https://github.com/getsentry/sentry-java/pull/3339

:bulb: Motivation and Context

  • part of #1193

:green_heart: How did you test it?

Unit tests and manually

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

:crystal_ball: Next steps

  • Feature parity with native Android implementation, e.g. breadcrumbs
  • https://github.com/getsentry/sentry/issues/63255
  • iOS/macOS support
  • integration test - needs either a beforeSend callback or a fake in-rpcess sentry http server.
  • docs.sentry.io

vaind avatar May 06 '24 12:05 vaind

Fails
:no_entry_sign: Please consider adding a changelog entry for the next release.
Messages
:book: Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

- Flutter replay for Android ([#2032](https://github.com/getsentry/sentry-dart/pull/2032))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description.

Generated by :no_entry_sign: dangerJS against 14340f73f540632a9f6cfa255d03785444be9040

github-actions[bot] avatar May 06 '24 12:05 github-actions[bot]

Android Performance metrics :rocket:

  Plain With Sentry Diff
Startup time 406.43 ms 480.49 ms 74.06 ms
Size 6.35 MiB 7.43 MiB 1.07 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
5baa2016731c3fe306570ee40d6f18206cf63791 389.26 ms 462.83 ms 73.57 ms
a1a1545fd407654eb215334f12a64688a206f1ad 295.21 ms 351.16 ms 55.95 ms
4b29d6e00433309052c4edd19c448fb33dd371f5 386.80 ms 430.86 ms 44.06 ms
f83bc1d235973d25cb628df973083f4093ed5282 319.32 ms 418.48 ms 99.16 ms
22ed6cbd073b8533f884fc1240d0c68a096d4efb 326.27 ms 393.00 ms 66.73 ms
cd16818c9a52b00812b5354203d617d4294a83f5 316.57 ms 375.19 ms 58.62 ms
408bdab123f225adb67d6213518f882ad8c3815f 360.18 ms 434.92 ms 74.74 ms
3de8b9b92406e56cedb15086ae779e72d5cdfb08 348.55 ms 445.84 ms 97.29 ms
df16b96fceb6ce836e4d52d33120d7b1d922d5a7 326.08 ms 391.82 ms 65.74 ms
5f2f77becb74ef2093007f845ec89eed6c5a031d 429.06 ms 507.74 ms 78.68 ms

App size

Revision Plain With Sentry Diff
5baa2016731c3fe306570ee40d6f18206cf63791 6.35 MiB 7.33 MiB 1005.56 KiB
a1a1545fd407654eb215334f12a64688a206f1ad 5.94 MiB 6.96 MiB 1.02 MiB
4b29d6e00433309052c4edd19c448fb33dd371f5 6.33 MiB 7.26 MiB 946.14 KiB
f83bc1d235973d25cb628df973083f4093ed5282 6.27 MiB 7.20 MiB 956.51 KiB
22ed6cbd073b8533f884fc1240d0c68a096d4efb 6.06 MiB 7.03 MiB 993.37 KiB
cd16818c9a52b00812b5354203d617d4294a83f5 6.26 MiB 7.20 MiB 956.08 KiB
408bdab123f225adb67d6213518f882ad8c3815f 6.27 MiB 7.20 MiB 959.07 KiB
3de8b9b92406e56cedb15086ae779e72d5cdfb08 6.27 MiB 7.20 MiB 957.75 KiB
df16b96fceb6ce836e4d52d33120d7b1d922d5a7 6.06 MiB 7.03 MiB 988.94 KiB
5f2f77becb74ef2093007f845ec89eed6c5a031d 6.35 MiB 7.40 MiB 1.05 MiB

Previous results on branch: feat/android-replay

Startup times

Revision Plain With Sentry Diff
c26a8a2bb02cddcd8bdc12055c5e24391a27739b 426.63 ms 513.30 ms 86.67 ms
8ef5d15345640f68fe0c3f8992a8402b9c3cf5ef 363.10 ms 443.18 ms 80.08 ms
0f6764b03ff80feb8f29fb8ecf5770bfd9465bf8 372.68 ms 459.57 ms 86.89 ms
12f57749dae1aa6f7e41c397c8a3694c70ff7ed2 359.96 ms 423.66 ms 63.70 ms
266a85a654fc753f356990ca747b924f3af20a22 351.96 ms 411.27 ms 59.31 ms
225c0c0110ef243d4bf23aea510286add648ac64 370.92 ms 441.16 ms 70.24 ms
b0290dc31af460c2bf564c8c883a8c9a3dfb6175 363.78 ms 385.64 ms 21.86 ms
95e3a3443df3f8739b295450891e18d0a7842c46 356.53 ms 421.07 ms 64.53 ms
f3057cd6f84fd730e8b08847ccd9e677cb4a84d6 483.35 ms 590.71 ms 107.35 ms
26d7b9cb958d2acec84a4feadff0229b55a1a240 400.89 ms 473.23 ms 72.34 ms

App size

Revision Plain With Sentry Diff
c26a8a2bb02cddcd8bdc12055c5e24391a27739b 6.35 MiB 7.42 MiB 1.06 MiB
8ef5d15345640f68fe0c3f8992a8402b9c3cf5ef 6.33 MiB 7.36 MiB 1.03 MiB
0f6764b03ff80feb8f29fb8ecf5770bfd9465bf8 6.33 MiB 7.36 MiB 1.03 MiB
12f57749dae1aa6f7e41c397c8a3694c70ff7ed2 6.33 MiB 7.35 MiB 1.02 MiB
266a85a654fc753f356990ca747b924f3af20a22 6.33 MiB 7.35 MiB 1.02 MiB
225c0c0110ef243d4bf23aea510286add648ac64 6.33 MiB 7.35 MiB 1.02 MiB
b0290dc31af460c2bf564c8c883a8c9a3dfb6175 6.33 MiB 7.34 MiB 1.01 MiB
95e3a3443df3f8739b295450891e18d0a7842c46 6.33 MiB 7.35 MiB 1.02 MiB
f3057cd6f84fd730e8b08847ccd9e677cb4a84d6 6.33 MiB 7.36 MiB 1.03 MiB
26d7b9cb958d2acec84a4feadff0229b55a1a240 6.35 MiB 7.42 MiB 1.07 MiB

github-actions[bot] avatar May 06 '24 13:05 github-actions[bot]

iOS Performance metrics :rocket:

  Plain With Sentry Diff
Startup time 1224.22 ms 1251.10 ms 26.88 ms
Size 8.34 MiB 9.65 MiB 1.31 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
dd1f7d2483a28171b7997267c82bb72740f38726 1263.16 ms 1275.15 ms 11.99 ms
5aab4c50b607235672bca57e31e7effb46050bab 1247.08 ms 1271.17 ms 24.09 ms
ba9c106515fc2731497c7e40c2ea0f885336884a 1241.76 ms 1265.15 ms 23.40 ms
69670c90c911d6af3e2ab631ee48e7b72f154993 1269.18 ms 1288.69 ms 19.51 ms
b98109e83d99d504cde5fbc4211536366741297c 1254.19 ms 1279.90 ms 25.71 ms
d53c6fa1b52ab8af533ed149f9b91e1fda4d810b 1254.86 ms 1270.83 ms 15.97 ms
c73ab672e1c6c1b4bdea7c2742b4e2d2efcef0ab 1267.73 ms 1279.36 ms 11.63 ms
a7acb24b1deda7eb424909eeb9e0f6897cba2cf0 1296.71 ms 1317.69 ms 20.98 ms
f83bc1d235973d25cb628df973083f4093ed5282 1247.12 ms 1249.78 ms 2.65 ms
3a439051e01626aeb18b40f281823af4f1f1689c 1254.31 ms 1266.35 ms 12.04 ms

App size

Revision Plain With Sentry Diff
dd1f7d2483a28171b7997267c82bb72740f38726 8.10 MiB 9.16 MiB 1.07 MiB
5aab4c50b607235672bca57e31e7effb46050bab 8.10 MiB 9.16 MiB 1.07 MiB
ba9c106515fc2731497c7e40c2ea0f885336884a 8.32 MiB 9.38 MiB 1.06 MiB
69670c90c911d6af3e2ab631ee48e7b72f154993 8.10 MiB 9.08 MiB 1004.49 KiB
b98109e83d99d504cde5fbc4211536366741297c 8.10 MiB 9.17 MiB 1.08 MiB
d53c6fa1b52ab8af533ed149f9b91e1fda4d810b 8.29 MiB 9.39 MiB 1.10 MiB
c73ab672e1c6c1b4bdea7c2742b4e2d2efcef0ab 8.29 MiB 9.36 MiB 1.07 MiB
a7acb24b1deda7eb424909eeb9e0f6897cba2cf0 8.16 MiB 9.17 MiB 1.01 MiB
f83bc1d235973d25cb628df973083f4093ed5282 8.28 MiB 9.34 MiB 1.05 MiB
3a439051e01626aeb18b40f281823af4f1f1689c 8.10 MiB 9.18 MiB 1.08 MiB

Previous results on branch: feat/android-replay

Startup times

Revision Plain With Sentry Diff
f3057cd6f84fd730e8b08847ccd9e677cb4a84d6 1241.47 ms 1253.55 ms 12.08 ms
93293f7d5f0afe15209b15d471055c7d610e2f37 1228.81 ms 1247.63 ms 18.82 ms
225c0c0110ef243d4bf23aea510286add648ac64 1232.86 ms 1254.49 ms 21.63 ms
266a85a654fc753f356990ca747b924f3af20a22 1239.76 ms 1265.02 ms 25.27 ms
26d7b9cb958d2acec84a4feadff0229b55a1a240 1249.50 ms 1268.27 ms 18.77 ms
3bf3ccab18a89985b9fcdd3a4c503636e209f0c0 1224.93 ms 1249.37 ms 24.44 ms
46527a39287324c1469263170d95c1eef335c772 1245.04 ms 1273.86 ms 28.82 ms
585386e23d92307ecda460fbe7123aa32d817e20 1241.33 ms 1263.73 ms 22.40 ms
95e3a3443df3f8739b295450891e18d0a7842c46 1246.85 ms 1265.45 ms 18.60 ms
f6b9266c6faf56bbde722f27c4539c6fb930fdea 1236.33 ms 1256.58 ms 20.25 ms

App size

Revision Plain With Sentry Diff
f3057cd6f84fd730e8b08847ccd9e677cb4a84d6 8.32 MiB 9.52 MiB 1.20 MiB
93293f7d5f0afe15209b15d471055c7d610e2f37 8.33 MiB 9.64 MiB 1.31 MiB
225c0c0110ef243d4bf23aea510286add648ac64 8.32 MiB 9.50 MiB 1.19 MiB
266a85a654fc753f356990ca747b924f3af20a22 8.32 MiB 9.50 MiB 1.19 MiB
26d7b9cb958d2acec84a4feadff0229b55a1a240 8.33 MiB 9.64 MiB 1.31 MiB
3bf3ccab18a89985b9fcdd3a4c503636e209f0c0 8.33 MiB 9.64 MiB 1.31 MiB
46527a39287324c1469263170d95c1eef335c772 8.32 MiB 9.50 MiB 1.19 MiB
585386e23d92307ecda460fbe7123aa32d817e20 8.32 MiB 9.50 MiB 1.19 MiB
95e3a3443df3f8739b295450891e18d0a7842c46 8.32 MiB 9.50 MiB 1.19 MiB
f6b9266c6faf56bbde722f27c4539c6fb930fdea 8.32 MiB 9.50 MiB 1.19 MiB

github-actions[bot] avatar May 06 '24 19:05 github-actions[bot]

Codecov Report

Attention: Patch coverage is 86.98885% with 35 lines in your changes missing coverage. Please review.

Project coverage is 88.13%. Comparing base (72eeb80) to head (14340f7).

Files with missing lines Patch % Lines
flutter/lib/src/replay/widget_filter.dart 83.63% 9 Missing :warning:
...lutter/lib/src/native/java/sentry_native_java.dart 85.41% 7 Missing :warning:
...ib/src/event_processor/replay_event_processor.dart 16.66% 5 Missing :warning:
flutter/lib/src/native/sentry_native_channel.dart 83.33% 5 Missing :warning:
flutter/lib/src/replay/recorder.dart 90.74% 5 Missing :warning:
dart/lib/src/protocol/breadcrumb.dart 75.00% 3 Missing :warning:
dart/lib/src/protocol/sentry_trace_context.dart 85.71% 1 Missing :warning:
Additional details and impacted files
@@               Coverage Diff               @@
##           feat/replay    #2032      +/-   ##
===============================================
- Coverage        88.22%   88.13%   -0.10%     
===============================================
  Files              230      236       +6     
  Lines             7899     8125     +226     
===============================================
+ Hits              6969     7161     +192     
- Misses             930      964      +34     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 12 '24 10:05 codecov[bot]

Sorry for the delay, will look over it once more tomorrow

buenaflor avatar May 21 '24 22:05 buenaflor

@vaind release was done. https://github.com/getsentry/sentry-java/releases/tag/7.12.0

bruno-garcia avatar Jul 15 '24 18:07 bruno-garcia