This guide provides essential information for setting up and utilizing the New RUM Experience for iOS and Android platforms. Follow the instructions below to ensure a smooth setup and optimal performance.
Enabling ingest to Grail has no impact on the classic data capturing. Dashboards, alerting and configurations on classic as well as billing are not impacted.
Experience Vitals.To enable the New RUM Experience for web frontends at the environment level
Make sure you have the following settings in your app:
PERFORMANCE or USER_BEHAVIOR.In the New RUM experience, RUM data is captured as user events, which are stored in the user.events table. The following user events are captured and stored in Grail:
HttpURLConnection and OkHttp requests reported as request eventsWith the New RUM Experience, Dynatrace automatically captures “Application Not Responding”(ANR) errors. ANRs are critical to monitor as they cause frustration to the user. The main problem is that the app's main thread, which is responsible for updating the UI, can't process user input events or draw, forcing the app to be closed.
These events are sent only if the mobile app is restarted within a timeframe of 10 minutes by the user.
By default, this feature is turned on. To turn it off use the following configuration options:
OneAgent only reports ANR errors on devices with Android 11 or higher. On older Android versions, the ANR Error event is not available.
Using the ConfigurationBuilder when starting the agent manually:
public ConfigurationBuilder withAnrReporting(boolean enabled)
Using the DSL:
dynatrace {configurations {sampleConfig {anrReporting false...}}}
Using the dictionary configuration when starting the agent manually:
Dynatrace.startup(withConfig: ["DTXANRReportingEnabled": false, …])
Using the plist file:
<key>DTXANRReportingEnabled</key><false/>
Using the dynatrace.config.js file:
module.exports = {react: {...},android: {// Those configs are copied 1:1config: `dynatrace {configurations {defaultConfig {...anrReporting false}}}`},ios: {// Those configs are copied 1:1config: `...<key>DTXANRReportingEnabled</key><false/>`}
Using the dynatrace.config.yaml file:
android:config:"dynatrace {configurations {defaultConfig {...anrReporting false}}}"ios:config:"...<key>DTXANRReportingEnabled</key><false/>"
Using the dynatrace.config.json file:
{"android": {"autoStart": {"beaconUrl": "https://...","applicationId": "..."},"anrReporting": false},"ios": {"DTXBeaconUrl": "https://...","DTXApplicationId": "...","DTXANRReportingEnabled": false}}
Native crashes are crashes that originate in C/C++ code added via NDK. The official Android documentation lists examples and how to diagnose them.
With the New RUM Experience, Dynatrace automatically captures native crashes. Events are sent only if the mobile app is restarted within a timeframe of 10 minutes by the end user.
By default, this feature is turned on. To turn it off use the following configuration options:
On older Android versions, the ANR Error event is not available. OneAgent only reports ANR errors on devices with Android 11 or higher. For Android 11 or higher, using the ConfigurationBuilder when starting the agent manually:
public ConfigurationBuilder withNativeCrashReporting(boolean enabled)
Using the DSL:
dynatrace {configurations {sampleConfig {nativeCrashReporting false...}}}
Once new RUM is enabled for a mobile app monitored by Dynatrace, data is stored in Grail. On each end user device on which the mobile app is installed, the new configuration will be applied only after the first user session is finished. Upon the very first app start OneAgent will initiate non-Grail communication and upgrade to Grail only if ordered by server configuration, and only on the next app start.
Hence, the first session will be captured only on RUM Classic, unless the following build-time configuration is additionally applied:
To avoid that and to start with Grail right away, the startupWithGrailEnabled flag must be set to true.
This can be done using the ConfigurationBuilder:
public ConfigurationBuilder withStartupWithGrailEnabled(boolean enabled)
Using the DSL:
dynatrace {configurations {sampleConfig {agentBehavior {startupWithGrailEnabled true}}}}
To avoid that and to start with Grail right away, the DTXStartupWithGrailEnabled flag must be set to true.
This can be done in the .plist file:
<key>DTXStartupWithGrailEnabled</key><true/>
If the Dynatrace.startup(withConfig:) method is used, it needs to be added there.
Dynatrace.startup(withConfig: ["DTXStartupWithGrailEnabled": true, …])
Using the dynatrace.config.js file:
module.exports = {react: {...},android: {// Those configs are copied 1:1config: `dynatrace {configurations {defaultConfig {...agentBehavior {startupWithGrailEnabled true}}}}`},ios: {// Those configs are copied 1:1config: `...<key>DTXStartupWithGrailEnabled</key><true/>`}
Using the dynatrace.config.yaml file:
android:config:"dynatrace {configurations {defaultConfig {...agentBehavior {startupWithGrailEnabled true}}}}"ios:config:"...<key>DTXStartupWithGrailEnabled</key><true/>"
Using the dynatrace.config.json file:
{"android": {"autoStart": {"beaconUrl": "https://...","applicationId": "..."},"agentBehavior": {"startupWithGrailEnabled": true}},"ios": {"DTXBeaconUrl": "https://...","DTXApplicationId": "...","DTXStartupWithGrailEnabled": true}}
OneAgent for Android now allows you to specify a custom OkHttp client to use for network requests, that are used to transmit RUM data to Grail.
This can be set using manual startup with the ConfigurationBuilder:
public ConfigurationBuilder withOkHttpClient(okhttp3.OkHttpClient httpClient)
Likewise, an OkHttp factory can be provided to achieve the same result:
public ConfigurationBuilder withOkHttpFactory(okhttp3.Call.Factory httpFactory)
Agent
Swift Instrumentor
Regarding manual instrumentation:
Dynatrace#getRequestTagHeader, Dynatrace#getRequestTag, Dynatrace#tagRequest, DTXAction#getRequestTagHeader, DTXAction#getRequestTag, DTXAction#tagRequest only support web request tagged with the x-dynatrace header. There is no API support for manual tagging with the traceparent header.Dynatrace#getWebRequestTiming for http or web socket monitoring.Regarding missing data: