Improve inApp by default on Android
https://github.com/getsentry/sentry-java/blob/main/sentry-android-core/src/main/java/io/sentry/android/core/AndroidOptionsInitializer.java#L173-L177
what's about adding the first 2 or 3 parts of the App's package as inApp by default?
eg, App's package (3 parts):
io.sentry.mobile.android
frames like io.sentry.mobile.shared won't be marked as inApp
unless they add inAppIncludes manually, which is suboptimal.
the idea would be to split it and take the very first 3 packages io.sentry.mobile.*
eg, App's package (2 parts):
io.sentry.android.mobile
frames like io.sentry.shared.android won't be marked as inApp.
the idea would be to split it and take the very first 2 packages io.sentry.*
it's a common pattern to have the company's domain in the very first 2 parts, so it'd not lead to that much false positive, but this would affect grouping and it'd require a major bump, I guess.
what do you think?
another option way less aggressive would be to be explicit about that on our docs and wizard, adding examples of that in the SDK setup instead of hidden in the config. options
@marandaneto It's a great idea to add it by default. We could add the first three levels:
I.e: App: io.sentry.app
We add: io.sentry.app
If the app is: br.com.mycompany.myapp it would end up br.com.mycompany
depends on https://github.com/getsentry/sentry-native/pull/514
Let's cap at 3 levels at a minimum, otherwise, go one level less, e.g. br.com.mycompany keeps as it is, br.com.mycompany.android becomes br.com.mycompany.
Let's investigate if this is possible via the Gradle plugin before going ahead, we might be able to have the full list of package names and pass this to the SDK init., it'd be more accurate.
We want to use the Sentry Android Gradle Plugin to get the full list of packages and add them to inAppIncludes.
According to @untitaker it's not a breaking change
Profiling is doing this server-side (for profiling specifically), align with them and @stefanosiano about how to do this.
Ideally we need some handling for this on the backend for obfuscated builds. Let's also make sure we handle basic cases right and e.g. do not mark com.* as in-app.