• Home
  • Platform modules
  • Digital Experience
  • Mobile applications
  • Android
  • Troubleshooting
  • Dynatrace Android Gradle plugin FAQs

Dynatrace Android Gradle plugin FAQs

Find out how to solve problems related to Android mobile app monitoring.

General

What does the `Max. user actions per minute exceeded` message mean?

A 'Max. user actions per minute exceeded' event informs you that the number of user actions generated from Real User Monitoring (Web, Mobile, and OpenKit) has exceeded a limit that is specific to your environment. Once this limit is reached, Dynatrace automatically throttles the number of user sessions being captured until the number of user actions is below the limit again. The throttling is done on a user session basis in order to provide statistically correct values in Dynatrace. If the overall traffic volume drops, Dynatrace will automatically return to the capturing rate you've set for your environment.

Why does Dynatrace change the capture rate?

The maximum user action count per minute limit is specific to your environment and is there to prevent unexpected high consumption of your license volume by unexpected IT events like unannounced marketing campaigns, unplanned load tests, DDoS attacks, aggressive web scanners, or other.

What is the impact on the data visible in the Dynatrace UI?

During the event period, Dynatrace reduces the amount of captured user sessions on the cluster side. Some of the sessions aren't captured and therefore no further analysis is applied.

  • All count metrics are impacted (for example, user session count, user action count, and conversion count).
  • Rate metrics (for example, JavaScript error rate, conversion rate, crash rate, and bounce rate) aren't impacted, since sessions are either captured fully or not at all.
  • Capture of the user session on the cluster side has no impact on the injection of the RUM JavaScript.

Can my environment limit be changed?

Increasing the user action per minute limit leads to analysis of more user sessions and, therefore, also increases your DEM consumption.

Dynatrace SaaS

The maximum user action count per minute limit is specific to your environment. To configure this limit, go to Settings > Web and mobile monitoring > RUM overload prevention in the Dynatrace web UI.

Adjusting the max user actions per minute limit for Dynatrace SaaS

Dynatrace Managed

The maximum user action count per minute limit is specific to your environment. You can configure this limit at Cluster Management Console > Environments in the Cluster overload prevention settings section.

Adjusting user action limit in Cluster Management Console

How do I know if my RUM application has exceeded the limit?

The User sessions page displays the following type of alert:

User sessions

The Maximum user actions per minute limit events are listed under the Events and Impact of user actions on performance sections of the corresponding application overview page.

Event chart

Max user action

An alert is also displayed under the Performance section of User actions.

Performance

Why is OneAgent for Android not sending data to my mobile app?

You might have to adjust the app or your server infrastructure to allow OneAgent to reach Dynatrace. Read Adjust OneAgent communication for more information.

The following list contains some problems that you might experience:

  • Verify that you used the correct applicationId and beaconUrl value provided by your monitoring app
  • Did you adapt the Network Security Configuration correctly? You must include system CA certificates or the certificate to your public Dynatrace Managed Cluster ActiveGate.
  • Check if Dynatrace or your public Dynatrace Managed Cluster ActiveGate is reachable from within your company network.
  • [For Dynatrace Managed] Does the public Dynatrace Managed Cluster ActiveGate have a valid certificate? Also, verify that the host/domain name is correct.
Why is my reported value, action name, and web request URL truncated?

OneAgent for Android truncates most (user-related) values when they exceed the border limit value of 250.

Dynatrace Android Gradle plugin

General

Why are some of my web requests missing?

Only web requests from a supported HTTP framework are captured. Check if your HTTP framework is on this list. If it isn't, instrument your web requests manually.

Also see Why am I missing web requests when I use the Firebase plugin?.

Why are web requests not associated with a given user action?

OneAgent for Android only attaches web requests to a user action triggered within a specific timeframe. The timeframe starts when the action opens and ends 500 ms after the action closes. You can change this value with the userActions.timeout property.

Why does my UI component not generate a user action?

There can be multiple reasons why OneAgent for Android can't create a user action:

  • The UI component is defined in WebView.
  • The UI component uses an unsupported listener. You can find the list of all supported listeners in the user action monitoring section.
Why am I missing web requests when I use the Firebase plugin?

The Dynatrace Android Gradle plugin is compatible with the Firebase Performance Monitoring plugin. However, there are some limitations.

If you are using Firebase Performance Monitoring plugin version 1.4.0+ with Android Gradle plugin version 4.2.x, you will be affected. The Firebase Performance Monitoring plugin uses an instrumentation approach that is incompatible with the Dynatrace Android Gradle plugin on this version of the Android Gradle plugin.

To see whether your build is affected, check the versions specified in the build.gradle file.

gradle
dependencies { classpath 'com.android.tools.build:gradle:4.2.0' // Android Gradle plugin classpath 'com.google.firebase:perf-plugin:1.4.0' // Firebase Performance Monitoring plugin }

Solution: Upgrade the Android Gradle plugin to version 7.0.0+, and use the latest version of the Dynatrace Android Gradle plugin.

Build problems

Why do I see the message `OneAgent SDK version <version_number> does not match Dynatrace Android Gradle plugin version <version_number>`?

OneAgent SDK and the Dynatrace Android Gradle plugin must have the same version. You may have added OneAgent SDK (with a higher version) via a Gradle dependency to your Android application project.

Why does my build fail with `Plugin with id com.dynatrace.instrumentation not found`?

Check if you have added the buildscript block with the classpath 'com.dynatrace.tools.android:gradle-plugin:8.+' dependency to your module's build.gradle file.

Why does my build fail with `Could not find com.dynatrace.tools.android:gradle-plugin:<version_number>`?

This is because Gradle was unable to find the specified version. Check if you have specified the correct version number. You can check the available version on Maven Central. You also must add mavenCentral() to your buildscript configuration.

Why does my build fail with `Could not find any version that matches com.dynatrace.tools.android:gradle-plugin:<version_number>.+.`?

Gradle was unable to find a version that matches your version settings. You can check the available version on Maven Central. You also have to add mavenCentral() to your buildscript configuration.

Why does my build fail with `Could not get unknown property dynatrace for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler`?

Check if you have applied the Dynatrace Android Gradle plugin before the dynatrace block dependency.

gradle
apply plugin: 'com.dynatrace.instrumentation' dynatrace { ... }
Why does my build fail with `No configuration for the Dynatrace Android Gradle plugin found! Please copy the configuration block from the instrumentation wizard to the proper location.`?

You have applied the Dynatrace Android Gradle plugin to your build.gradle file but you did not provide a plugin configuration. Please follow step 3 of the Instrumentation via Dynatrace Android Gradle plugin section. For React Native apps, please follow the troubleshooting instructions at Dynatrace React Native Plugin documentation.

Why do I see the message `Task printVariantAffiliation not found in project :<module_name>`?

Ensure that you have added the Dynatrace Android Gradle plugin to the buildscript classpath and that you have applied the plugin.

The Dynatrace Android Gradle plugin only generates new Gradle tasks (like the printVariantAffiliation task) for specific subprojects of your Android application project. It does not generate tasks for the root project and some subproject. For example, the Dynatrace Android Gradle plugin doesn't generate the printVariantAffiliation for Android library modules.

Why do I see the message `The Dynatrace Android Gradle Plugin can only be applied to Android projects`?

The Dynatrace Android Gradle plugin can only be used when your Android project is built with the Android Gradle plugin. This error message is displayed when the Dynatrace Android Gradle plugin is used in non-Android projects or in Android projects that are not built via the Android Gradle plugin.

Why do I see the message `The Dynatrace Android Gradle plugin must be applied in the top-level build.gradle (or build.gradle.kts) file`?

The plugin with ID com.dynatrace.instrumentation must be applied in the top-level build.gradle file. Most likely, you have added the plugin configuration to the wrong build.gradle file. Verify that the plugin is used in the correct build.gradle file.

Why do I see the message `The Dynatrace Android Gradle plugin can't be directly applied to a Java- or Android-related module`?

Your project does not use the recommended architecture; it uses an uncommon project architecture.

  • If your Android project only contains one build.gradle file, follow the steps at Android projects with only one build file.
  • For other project architectures, we recommend that you contact a Dynatrace ONE product specialist.
Why do I see the message `It is not possible to use both Dynatrace plugins ('com.dynatrace.instrumentation' and 'com.dynatrace.instrumentation.module') for the same module`?

The plugin with ID com.dynatrace.instrumentation automatically configures all modules in your project. Therefore, use of the plugin with ID com.dynatrace.instrumentation.module is not required. See Change Dynatrace Android Gradle plugin configuration based on the project structure to understand when you should use the plugin with the ID com.dynatrace.instrumentation.module.