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

WIP: Flutter replay #2011

Closed
wants to merge 39 commits into from
Closed

WIP: Flutter replay #2011

wants to merge 39 commits into from

Conversation

vaind
Copy link
Collaborator

@vaind vaind commented Apr 25, 2024

📜 Description

Adds session replay support for Flutter (Android, iOS)

💡 Motivation and Context

closes #1193

💚 How did you test it?

📝 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 25, 2024

Fails
🚫 Please consider adding a changelog entry for the next release.

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 ([#2011](https://github.com/getsentry/sentry-dart/pull/2011))

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

Generated by 🚫 dangerJS against 46a96b0

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

ktlint

flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt|205 col 1| Unexpected indentation (10) (should be 6)
flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt|355 col 1| Unexpected indentation (6) (should be 4)
flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt|382 col 1| Unexpected indentation (8) (should be 6)
flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt|382 col 9| Newline expected after opening parenthesis
flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt|383 col 1| Unexpected indentation (8) (should be 6)
flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt|383 col 9| Parameter should start on a newline
flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt|384 col 1| Unexpected indentation (8) (should be 6)
flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt|384 col 9| Parameter should start on a newline
flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt|412 col 1| Unexpected indentation (8) (should be 6)
flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt|413 col 1| Unexpected indentation (12) (should be 8)
flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt|414 col 1| Unexpected indentation (12) (should be 8)
flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt|415 col 1| Unexpected indentation (12) (should be 8)
flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt|416 col 1| Unexpected indentation (8) (should be 6)

Copy link
Contributor

github-actions bot commented May 2, 2024

Android Performance metrics 🚀

  Plain With Sentry Diff
Startup time 374.86 ms 417.83 ms 42.97 ms
Size 6.33 MiB 7.39 MiB 1.05 MiB

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

@vaind
Copy link
Collaborator Author

vaind commented May 6, 2024

I've used jni & jnigen here to integrate with native sentry-java replay support for Android. However, in order to make callbacks work, we need at least jni/jnigen v0.6.0 which would increase our minimum supported SDK version to Flutter 3.13. Therefore, I'm closing this and will create a new PR that uses method channels for Java.

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.

Session Replay support for Flutter
1 participant