sentry-android-gradle-plugin
sentry-android-gradle-plugin copied to clipboard
Send modules along with SentryEvent
There's a capability in the Sentry product to display installed modules/dependencies, for instance, this is how it looks for Ruby

Would be nice to do something similar for the Android SDK - we can collect the dependencies of an app through SAGP and make them available at runtime for the SDK, for example as a file under res/raw folder, and then the SDK can send it alongside protocol. This is already available in the protocol
the AGP already generates a file with all the dependencies under a text file. it'd be nice if the SAGP picks this file up and make it available to the Sentry Android SDK, so we can send it at runtime.
pay attention that a big App could increase quite a lot the event size, could be that we exceed the 1MB max size.
do we want transitive dependencies or not?
an alternative for event size is using attachments.
this file could be under the resources/assets folder, so an event processor picks it up, loads it to memory, and attaches it to the events.
the file is only available for release builds, so either we choose to send this only for release builds or we implement our own dependency gathering logic
the file is only available for release builds, so either we choose to send this only for release builds or we implement our own dependency gathering logic
its fine to be only during release build.
Just dropping my thoughts here: shouldn't the list of dependencies be uploaded at build time instead? Imho the list of deps should be uploaded alongside the proguard mapping and matched/displayed on the backend side. Uploading it at runtime adds unnecessary overhead for the user as you'll be essentially sending a static file over and over.
@cortinico yes, that would be ideal, that would require changes on the backend tho.
our protocol already supports it tho thru the event https://develop.sentry.dev/sdk/event-payloads/ via modules list.
we'll keep that in mind, maybe could be done along with https://github.com/getsentry/sentry-android-gradle-plugin/issues/40