sentry-android-gradle-plugin icon indicating copy to clipboard operation
sentry-android-gradle-plugin copied to clipboard

Allow excluding certain libs from instrumentation

Open romtsn opened this issue 3 years ago • 2 comments

As we have quite a few issues reported where our auto-instrumentation fails to instrument obfuscated/minified libs, it's not really scalable to release a new patch-fix always. We should provide an option for the users to manually exclude the failing libs from instrumentation.

  • On AGP < 7.2. we should implement our own logic for excluding to maintain backward-compatibility
  • On AGP 7.2+ this comes as part of their API already, so we probably need to wire our inputs to theirs.

romtsn avatar Apr 12 '22 10:04 romtsn

Consider creating a troubleshooting for now, before we get this one, so people know why and how to disable the broken instrumentation. https://github.com/getsentry/sentry-docs/issues/4397 but we don't need to address all the cases now, a new page with only this item would be fine for now.

marandaneto avatar Apr 12 '22 15:04 marandaneto

The frontend uses a regex to find out if something is minified or not, https://github.com/getsentry/sentry/blob/b5cc15b4d114fae56880e92f65ccbf4c742135f0/static/app/components/events/eventEntries.tsx#L151-L157= But this solution alone won't help since the false positives may still allow some classes to be minified and cause instrumentation issues.

marandaneto avatar Apr 12 '22 15:04 marandaneto