Dynatrace Android Gradle plugin FAQs
Find out how to solve problems related to Android mobile app monitoring.
General
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.
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.
How do I know if my RUM application has exceeded the limit?
The User sessions page displays the following type of alert:
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.
An alert is also displayed under the Performance section of User actions.
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
andbeaconUrl
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.
OneAgent for Android truncates most (user-related) values when they exceed the border limit value of 250.
Dynatrace Android Gradle plugin
General
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?.
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.
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.
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.
gradledependencies {
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
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.
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.
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.
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.
Check if you have applied the Dynatrace Android Gradle plugin before the dynatrace
block dependency.
gradleapply plugin: 'com.dynatrace.instrumentation'
dynatrace {
...
}
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.
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.
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.
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.
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.
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
.