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

refactor: move native SDK init and close to SentryNativeBinding #2030

Merged
merged 6 commits into from
May 6, 2024

Conversation

vaind
Copy link
Collaborator

@vaind vaind commented May 6, 2024

📜 Description

Moves initNativeSDK() and close() out of the integration to the binding. This way, then can be overloaded/implemented in a platform-specific way - e.g. a different call for cocoa and for java.

💡 Motivation and Context

I've needed to make this change in order to set up native bindings in the right order for JNI. While we won't have JNI interop right now, I'd still prefer to land these changes so they're in place for the future and don't need to be done again.

💚 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 May 6, 2024

Android Performance metrics 🚀

  Plain With Sentry Diff
Startup time 379.19 ms 452.49 ms 73.30 ms
Size 6.33 MiB 7.29 MiB 987.32 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

@vaind vaind enabled auto-merge (squash) May 6, 2024 12:19
Copy link
Contributor

github-actions bot commented May 6, 2024

iOS Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1244.40 ms 1260.18 ms 15.78 ms
Size 8.32 MiB 9.50 MiB 1.18 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
25e9b59 1289.76 ms 1295.27 ms 5.51 ms
6fedcab 1242.33 ms 1269.66 ms 27.33 ms
f275487 1291.65 ms 1339.92 ms 48.26 ms
559d28f 1265.04 ms 1288.96 ms 23.92 ms
56810ff 1267.59 ms 1293.48 ms 25.89 ms
746a779 1227.06 ms 1243.53 ms 16.47 ms
7ade5af 1296.24 ms 1297.43 ms 1.18 ms
aa950e9 1275.17 ms 1295.33 ms 20.16 ms
26e955b 1232.35 ms 1258.88 ms 26.52 ms
6078ddc 1207.84 ms 1224.10 ms 16.27 ms

App size

Revision Plain With Sentry Diff
25e9b59 8.16 MiB 9.15 MiB 1021.15 KiB
6fedcab 8.32 MiB 9.50 MiB 1.18 MiB
f275487 8.32 MiB 9.38 MiB 1.05 MiB
559d28f 8.15 MiB 9.12 MiB 987.32 KiB
56810ff 8.15 MiB 9.12 MiB 987.35 KiB
746a779 8.28 MiB 9.33 MiB 1.05 MiB
7ade5af 8.15 MiB 9.15 MiB 1015.93 KiB
aa950e9 8.16 MiB 9.17 MiB 1.01 MiB
26e955b 8.28 MiB 9.34 MiB 1.05 MiB
6078ddc 8.33 MiB 9.40 MiB 1.07 MiB

@vaind vaind merged commit c978477 into main May 6, 2024
44 checks passed
@vaind vaind deleted the refactor/flutter-native-init branch May 6, 2024 15:06
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