From bcad1d4a7f28d02f72ce700b9f544e6f719118ac Mon Sep 17 00:00:00 2001 From: James Rich <2199651+jamesarich@users.noreply.github.com> Date: Tue, 26 Aug 2025 08:48:29 -0500 Subject: [PATCH] feat(analytics): enable datadog user interaction tracking (#2848) Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com> --- app/build.gradle.kts | 8 ++++---- .../com/geeksville/mesh/android/GeeksvilleApplication.kt | 4 +--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 15eb9cf25..87983f0c4 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -15,6 +15,7 @@ * along with this program. If not, see . */ +import com.datadog.gradle.plugin.InstrumentationMode import io.gitlab.arturbosch.detekt.Detekt import java.io.FileInputStream import java.util.Properties @@ -149,7 +150,6 @@ android { } bundle { language { enableSplit = false } } buildFeatures { - viewBinding = true compose = true aidl = true buildConfig = true @@ -182,9 +182,9 @@ secrets { } datadog { - // compose instrumentation is broken for kotlin 2.2.x - see: - // https://github.com/DataDog/dd-sdk-android-gradle-plugin/issues/407 - // composeInstrumentation = InstrumentationMode.AUTO + if (!gradle.startParameter.taskNames.any { it.contains("fdroid", ignoreCase = true) }) { + composeInstrumentation = InstrumentationMode.AUTO + } } // per protobuf-gradle-plugin docs, this is recommended for android diff --git a/app/src/google/java/com/geeksville/mesh/android/GeeksvilleApplication.kt b/app/src/google/java/com/geeksville/mesh/android/GeeksvilleApplication.kt index c183b3384..83b4163b4 100644 --- a/app/src/google/java/com/geeksville/mesh/android/GeeksvilleApplication.kt +++ b/app/src/google/java/com/geeksville/mesh/android/GeeksvilleApplication.kt @@ -176,9 +176,7 @@ abstract class GeeksvilleApplication : .trackFrustrations(true) .trackLongTasks() .trackNonFatalAnrs(true) - // Re-enable tracking when auto instrumentation available. See note in `app/build.gradle` - .disableUserInteractionTracking() - // .trackUserInteractions() + .trackUserInteractions() .enableComposeActionTracking() .build() Rum.enable(rumConfiguration)