This guide provides essential information for setting up and utilizing the New RUM Experience for both iOS and Android platforms, and web monitoring. 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.
Prerequisites
Before enabling the New RUM Experience, ensure that the following prerequisites are met.
RUM JavaScript version
During the preview, the RUM JavaScript must be up to date to ensure compatibility with data ingestion. Configure the RUM JavaScript version to either Latest stable or Previous stable, as described in Control the RUM JavaScript version.
Dynatrace OneAgent version
While the minimum required version is OneAgent version 1.301+, we recommend using the latest available version, as new features are added regularly.
Firewall constraints
Ensure that your infrastructure complies with the firewall constraints for RUM. Note that when using the New RUM Experience, the request bodies of RUM beacons are compressed.
Enable the New RUM Experience
To enable the New RUM Experience
In Experience Vitals, select the frontend you want to monitor.
Navigate to the Settings tab.
Under Enablement and cost control, enable the New Real User Monitoring Experience toggle.
Additionally, you can enable Experience Analytics to capture user interactions.
Update the injection:
For automatic injection, wait 1-2 minutes for the rollout of the new configuration.
For manual insertion, copy and paste the snippet into your web page and re-deploy your app.
User events automatically reported to Grail
In the New RUM experience, RUM data is captured as user events, which are stored in the user.eventstable. The following user events are captured and stored in Grail:
Web requests including all xhr/fetch requests and ResourceTiming information
Page summaries
Visibility changes, such as background and foreground information
Navigations
Errors and exceptions
User Interactions (if Experience Analytics is enabled)
The following features are unavailable in the New RUM Experience:
The snippet format code snippet (sync and async)
User actions
Ending user sessions via JavaScript API
Visually complete
User action and session properties defined in RUM classic. This functionality is covered by event and session properties.
Rage clicks
Session replay
Enable New RUM Experience for iOS and Android
In Dynatrace, go to your application settings.
From the application settings, select General > Enablement and cost control.
Under Real User Monitoring, enable the Enable New Real User Monitoring toggle.
Update your Dynatrace agent to the latest version.
Start the app in your local environment, and wait until the agent downloads the new configuration.
Wait for the current session to timeout, update user privacy options, or restart the app, so the new configuration takes effect.
Set up your mobile app for New RUM Experience
Make sure you have the following settings in your app:
Verify that the cost control settings for your application is set to 100%. If you set it below that threshold, not all sessions' events will be reported to Grail.
Server Firewall: Ensure that you allow the traceparent HTTP header.
Data Privacy: Set the data collection level to PERFORMANCE or USER_BEHAVIOR.
To report crashes, your user must opt-in for data privacy compliance.
To avoid session timeouts, ensure proper session management for Grail activation.
User events automatically reported to Grail (iOS and Android)
In the New RUM experience, RUM data is captured as user events, which are stored in the user.eventstable. The following user events are captured and stored in Grail:
Crash Reporting: Reported as mobile error events
Web requests: HttpURLConnection and OkHttp requests reported as request events
Visibility change event
Mobile app start event
ANR Reporting for mobile
With 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:
Android
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
...
}
}
}
iOS
Using the dictionary configuration when starting the agent manually:
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
...
}
}
}
Enable instant capturing of user events
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:
Android
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
}
}
}
}
iOS
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#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.
You can only use Dynatrace#getWebRequestTiming for http or web socket monitoring.
Regarding missing data:
User actions
Custom value reporting (values and events) - to capture these in Grail as well, additionally use the new APIs above
Lifecycle events
Rage tap events
Session end event
Session replay
Limitations
ANR and crashes are not reported immediately, they get sent to Grail as soon as a user restarts the app.
Cost control settings are only applied partially. The first events of a discarded session are visible in Grail. This won't lead to any additional costs.
The agent doesn't immediately report events when your app moves to the background, they're reported within 2 minutes.
After enabling the New RUM experience, the initial user session is still captured using RUM Classic unless startup flags are set. For more information, see Enable instant capturing of user events.