#Unable to disable automatic tracing for android

6 messages · Page 1 of 1 (latest)

fleet void
#

I am trying to implement a bare-bones tracing setup for my project (android) by disabling everything and just using custom traces.
However I am still getting spans from db.sql.query and db.sql.room, what am I missing?

Note: There is no custom instrumentation done when I set up the db

I have added the following

// AndroidManifest.xml
<application>
...
        <meta-data
            android:name="io.sentry.traces.activity.enable"
            android:value="false" />
</application>

 
// app/build.gradle
sentry {
...
tracingInstrumentation {
        enabled.set(true)
        features.set(EnumSet.allOf(InstrumentationFeature::class.java) - InstrumentationFeature.DATABASE)
        logcat {
            enabled.set(true)
            minLevel.set(LogcatLevel.INFO)
        }
    }
}
peak anvil
#

Hi, which version of the Android SDK & Android Gradle Plugin are you running?

fleet void
#

gradle plugin - 5.5.0
android sdk - 8.13.2

Also autoInstallation of 8.13.2

        enabled = true
        sentryVersion = "8.13.2"
    }
stark fiber
#

Hi @fleet void
Your configuration looks correct
Are you applying the sentry gradle plugin to the app module only?
One possibility is you're facing a gradle caching issue. Can you run ./gradlew clean and try again?

fleet void
#

Hi @stark fiber
Yes plugin applied to the app level. My root level build.gradle has it but its set to not be applied
alias(libs.plugins.sentry) apply false

Still no luck with rebuild, spans from room db are still showing up

What I have tried

  • run ./gradlew clean at the root level
  • Click on Clean Project in android studio
stark fiber
#

@fleet void the configuration looks correct and at a glance it should work
I opened an issue on github to try to reproduce it and keep track of it
We'll let you know

GitHub

Description A user reported the addition of db.sql.room and db.sql.query spans, even if database instrumentation is removed. Gradle plugin version: 5.5.0 with android sdk 8.13.2 Reported config: //...