cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SDK configuration for custom Android app

andreaCaria
Participant

Hi, we are instrumenting an android app with the dynatrace SDK version: 8.273.1.1003 (https://www.dynatrace.com/support/help/platform-modules/digital-experience/mobile-applications/instr...)

Due to technical limitations on networking, we would like to limit the monitor only to the actions set in the code in this way:

DTXAction webAction = Dynatrace.enterAction("ACTION NAME");

(https://www.dynatrace.com/support/help/platform-modules/digital-experience/mobile-applications/instr...)

 

Unfortunately, we are still seeing actions not set such as this:

  • Loading SmartphoneHomeActivity
  • Loading FAST Pax Staging
  • Touch on LinearLayout
  • Touch on ImageView

In this link:

https://www.dynatrace.com/support/help/shortlink/oneagent-sdk-for-android#disable-lifecycle-monitori...

We have seen that is possible to disable the Automatic monitor of the app but is not working.

There are any configurations that we need to set to achieve the result?

 

3 REPLIES 3

Thomas_Wirth1
Dynatrace Champion
Dynatrace Champion

Hey,

I assume you instrument your app with the Dynatrace Android Gradle plugin, because user actions like "Touch on ImageView" are only generated when auto-instrumentation (via the plugin) is enabled. You can verify this assumption by looking at the build.gradle files and check if the snippets from this page were added.
The linked setting "withActivityMonitoring" only deactivate monitoring for activity lifecycle events. Only the action "Loading SmartphoneHomeActivity" falls into this category. The other actions are generated by the different auto-instrumentation features of the Dynatrace Android Gradle plugin.

The Dynatrace Android Gradle plugin allows users to deactivate all auto-instrumentation features via the plugin DSL. When you want to deactivate ALL auto-instrumentation features, then Dynatrace recommends to remove the plugin snippets from your build.gradle files and instead use standalone-manual instrumentation, because the plugin affects the build time of non-incremental builds.

When the standalone-manual instrumentation is used, only two monitoring features are enabled by default: crash reporting and activity lifecycle monitoring. You can deactivate both features via the configuration builder (see JavaDoc)

andreaCaria
Participant

Hi,

thank you for your meaningful answer. I double-checked but it does not seem we are using the plugin. We did not see any code snippet that you mentioned...

We have simply added this:

 

dependencies {

    implementation("com.dynatrace.agent:agent-android:8.273.1.1003")

 

in the build.gradle.kts file

And then start the monitoring using this guide:

https://www.dynatrace.com/support/help/platform-modules/digital-experience/mobile-applications/instrument-android-app/instrumentation-via-oneagent-sdk/oneagent-sdk-for-android#start-oneagent

Do you have any other clue?

Thanks a lot,

Andrea

User action monitoring is only available with auto-instrumentation or by manually generating "Touch on <component>" user actions. Based on the user actions names, I would assume that these actions are generated by auto-instrumentation. Because of the flexibility of Gradle, there are several other possibilities how the Dynatrace Android Gradle plugin could be added to the Android build.
We would have to take a look at the monitoring data or the agent debug logs to determine who generated these user actions. Therefore I recommend to create a support ticket, where you can privately share details about your app and Dynatrace can assist you in troubleshooting this problem.

Featured Posts