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

Move NDK from sentry-java to sentry-native #3189

Merged
merged 15 commits into from
May 28, 2024
Merged

Move NDK from sentry-java to sentry-native #3189

merged 15 commits into from
May 28, 2024

Conversation

markushi
Copy link
Member

@markushi markushi commented Feb 5, 2024

📜 Description

Relevant sentry-native PR: getsentry/sentry-native#944
To make this branch work, you need to publish the sentry-native ndk artifact first:

  1. cd sentry-native/ndk
  2. ./gradlew :lib:publishToMavenLocal

💡 Motivation and Context

Move NDK code over to sentry-native, to make it more testable and robust.

💚 How did you test it?

It's reusing the existing tests.

📝 Checklist

  • Release sentry-native first
  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Copy link
Contributor

github-actions bot commented Feb 5, 2024

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

Generated by 🚫 dangerJS against 14b2cfd

@markushi markushi changed the title PoC: Move NDK from sentry-java to sentry-native Move NDK from sentry-java to sentry-native May 8, 2024
@markushi markushi marked this pull request as ready for review May 8, 2024 09:15
@@ -101,6 +71,8 @@ dependencies {
api(projects.sentry)
api(projects.sentryAndroidCore)

implementation("io.sentry:sentry-native-ndk:0.7.20")
Copy link
Member

Choose a reason for hiding this comment

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

we'll probably need to make our dependency updater work for this module too

@@ -7,7 +7,7 @@ public final class io/sentry/android/ndk/BuildConfig {
}

public final class io/sentry/android/ndk/DebugImagesLoader : io/sentry/android/core/IDebugImagesLoader {
public fun <init> (Lio/sentry/android/core/SentryAndroidOptions;Lio/sentry/android/ndk/NativeModuleListLoader;)V
public fun <init> (Lio/sentry/android/core/SentryAndroidOptions;Lio/sentry/ndk/NativeModuleListLoader;)V
Copy link
Member

Choose a reason for hiding this comment

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

This smells like a breaking change - should we make it part of v8 actually?

Copy link
Member

@romtsn romtsn left a comment

Choose a reason for hiding this comment

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

LGTM, except that it's binary-incompatible with older versions now, maybe we should make it part of v8?

@markushi markushi added this to the 8.0.0 milestone May 21, 2024
@markushi markushi changed the base branch from main to 8.x.x May 22, 2024 08:24
Copy link
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 472.25 ms 544.23 ms 71.98 ms
Size 1.70 MiB 2.28 MiB 597.68 KiB

Baseline results on branch: 8.x.x

Startup times

Revision Plain With Sentry Diff
a373f02 372.81 ms 432.96 ms 60.15 ms
3e1e45b 373.72 ms 439.33 ms 65.60 ms
dcad3c9 400.04 ms 479.67 ms 79.62 ms
6f16882 426.16 ms 494.15 ms 67.99 ms
9f2c855 424.20 ms 506.34 ms 82.14 ms

App size

Revision Plain With Sentry Diff
a373f02 1.70 MiB 2.28 MiB 596.35 KiB
3e1e45b 1.70 MiB 2.28 MiB 596.32 KiB
dcad3c9 1.70 MiB 2.28 MiB 596.35 KiB
6f16882 1.70 MiB 2.28 MiB 596.37 KiB
9f2c855 1.70 MiB 2.28 MiB 596.32 KiB

@markushi markushi merged commit a3c251e into 8.x.x May 28, 2024
21 checks passed
@markushi markushi deleted the feat/move-ndk branch May 28, 2024 13:19
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