Problem
Integrating both the New Relic Android agent and Sentry monitoring SDK can lead to conflicts, crashes, or errors within your app.
This is known to cause issues like java.lang.StackOverflowError
.
Solution
You'll need to prevent the Android agent from instrumenting the Sentry Monitoring SDK. To achieve this, configure the New Relic agent to exclude the Sentry package from instrumentation. Here's how:
Add the following block to your
build.gradle
file:newrelic {// Don't instrument sample classesexcludePackageInstrumentation("io.sentry.*")}
This configuration tells the New Relic agent to skip instrumenting any classes within the io.sentry
package.
If you encounter any issues or require additional help, you can reach New Relic support at support.newrelic.com.