enh: refactor init to use JNI/FFI#3324
Merged
Merged
Conversation
Contributor
🚨 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:
|
Contributor
iOS Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 819c1e7 | 1250.59 ms | 1249.08 ms | -1.51 ms |
| 765aa8b | 1259.09 ms | 1269.90 ms | 10.82 ms |
| ad121c0 | 1275.04 ms | 1280.59 ms | 5.55 ms |
| de377fd | 1252.28 ms | 1254.76 ms | 2.48 ms |
| 192b44c | 1269.08 ms | 1275.52 ms | 6.44 ms |
| e1ab497 | 1260.92 ms | 1260.22 ms | -0.69 ms |
| 6ad8fc4 | 1263.70 ms | 1266.06 ms | 2.36 ms |
| 5b9a0da | 1249.69 ms | 1250.71 ms | 1.03 ms |
| c0dde50 | 1268.90 ms | 1275.61 ms | 6.71 ms |
| 6bcdc99 | 1257.16 ms | 1264.96 ms | 7.79 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 819c1e7 | 5.53 MiB | 6.00 MiB | 479.96 KiB |
| 765aa8b | 7.86 MiB | 9.44 MiB | 1.58 MiB |
| ad121c0 | 5.53 MiB | 6.01 MiB | 488.11 KiB |
| de377fd | 20.71 MiB | 22.43 MiB | 1.73 MiB |
| 192b44c | 5.53 MiB | 5.96 MiB | 444.33 KiB |
| e1ab497 | 5.53 MiB | 6.01 MiB | 487.96 KiB |
| 6ad8fc4 | 5.53 MiB | 6.01 MiB | 487.65 KiB |
| 5b9a0da | 5.53 MiB | 5.96 MiB | 444.32 KiB |
| c0dde50 | 5.53 MiB | 6.01 MiB | 488.14 KiB |
| 6bcdc99 | 5.53 MiB | 6.00 MiB | 479.95 KiB |
Previous results on branch: enh/ffi-jni-init
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 1f506d7 | 1255.16 ms | 1253.69 ms | -1.48 ms |
| 48149f1 | 1240.53 ms | 1252.12 ms | 11.59 ms |
| 89fb6c2 | 1250.77 ms | 1255.64 ms | 4.87 ms |
| 37f0c51 | 1250.10 ms | 1248.25 ms | -1.85 ms |
| 0f928f6 | 1247.59 ms | 1255.63 ms | 8.04 ms |
| 21cac57 | 1259.12 ms | 1269.06 ms | 9.94 ms |
| ab4c77e | 1267.45 ms | 1275.17 ms | 7.71 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 1f506d7 | 5.53 MiB | 6.02 MiB | 501.99 KiB |
| 48149f1 | 5.53 MiB | 6.02 MiB | 502.03 KiB |
| 89fb6c2 | 5.53 MiB | 6.02 MiB | 502.04 KiB |
| 37f0c51 | 5.53 MiB | 6.02 MiB | 502.02 KiB |
| 0f928f6 | 5.53 MiB | 6.02 MiB | 502.02 KiB |
| 21cac57 | 5.53 MiB | 6.02 MiB | 501.98 KiB |
| ab4c77e | 5.53 MiB | 6.02 MiB | 502.31 KiB |
buenaflor
commented
Nov 11, 2025
buenaflor
commented
Nov 11, 2025
buenaflor
commented
Nov 11, 2025
| final ObjCObjectBase Function(Object) _defaultObjcConverter = (obj) { | ||
| return switch (obj) { | ||
| bool b => b ? 1.toNSNumber() : 0.toNSNumber(), | ||
| bool b => NSNumberCreation.numberWithBool(b), |
Contributor
Author
There was a problem hiding this comment.
previous convert was wrong, it should've been using NSNumberCreation
init to use JNI/FFIinit to use JNI/FFI
buenaflor
marked this pull request as ready for review
November 14, 2025 11:57
There was a problem hiding this comment.
Bug: Performance Tracking Ignores Disabled State
The autoPerformanceTracingEnabled check was removed from fetchNativeAppStartAsBytes, meaning app start metrics are now returned even when auto performance tracing is disabled. This changes behavior from the previous implementation where the function would return null early when autoPerformanceTracingEnabled was false, potentially causing unwanted performance tracking.
packages/flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt#L185-L196
buenaflor
added a commit
that referenced
this pull request
Jul 6, 2026
The v10 feature work pushed the with-Sentry APK size diff to ~1409 KiB, past the 1350 KiB budget, failing the SDK metrics job on v10-branch and every PR based on it. Raise diffMax to 1450 KiB, following the same pattern as #3324 and #3567. Co-Authored-By: Claude Fable 5 <[email protected]>
buenaflor
added a commit
that referenced
this pull request
Jul 6, 2026
* ref!: Make clone() internal; drop protocol clones clone() on Hub, Scope, NoOpHub, HubAdapter and Sentry is intended for SDK-internal use only, so mark it @internal. The protocol clone() methods (Contexts and its children) were already @deprecated and formed a dead subtree with no remaining callers, so remove them along with the alias-only clone context test. BREAKING CHANGE: The deprecated clone() on protocol classes is removed, and clone() on Hub/Scope is now @internal. Fixes GH-3824 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * ref: Rename feature flag copy() to clone() Align internal naming with Hub.clone() and Scope.clone(). The copy name existed only to avoid clashing with the deprecated public clone() API, which this branch removes. Co-Authored-By: Claude Fable 5 <[email protected]> * test(flutter): Fix OnProcessSpan calls missing Hint PR #3847 added a required hint parameter to OnProcessSpan but missed the five call sites in thread_info_integration_test.dart, which landed in parallel. This breaks compilation of the flutter test suite and the analyze gate on v10-branch, failing CI for every PR based on it. Co-Authored-By: Claude Fable 5 <[email protected]> * chore(metrics): Raise Android binary size budget The v10 feature work pushed the with-Sentry APK size diff to ~1409 KiB, past the 1350 KiB budget, failing the SDK metrics job on v10-branch and every PR based on it. Raise diffMax to 1450 KiB, following the same pattern as #3324 and #3567. Co-Authored-By: Claude Fable 5 <[email protected]> --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
💡 Motivation and Context
💚 How did you test it?
📝 Checklist
sendDefaultPiiis enabled🔮 Next steps