In the majority of RUM scenarios, at least one additional request for monitoring code is issued by the browser:
The Real User Monitoring code source determines where the monitoring code is loaded from and which URL is used for these requests.
By default, a monitoring code source is applied that is suitable for most environments and varies based on the instrumentation method used for your frontend. This section describes the default behavior in detail, and the next outlines configuration options for scenarios that require customization.
If you opted for agentless monitoring, the monitoring code is requested from the Dynatrace CDN. In case of the snippet format JavaScript tag, the filename ends with _complete.js and contains a frontend identifier (for example, 7cab1abeacdfe1_complete.js). For all other formats, it starts with ruxitagent_ and contains information about the active code modules and monitoring code version (for example, ruxitagent_ICA1589ENPQRTUVXfghqru_10307250124095659.js). The filename of the Session Replay Classic monitoring code starts with ruxitagent_ (for example, ruxitagent_D_10307250124095659.js) for all snippet formats.
If the RUM JavaScript is injected automatically, both RUM and Session Replay Classic monitoring code are requested from your web or application server using a root-relative URL where the filename starts with ruxitagentjs_ and contains information about the active code modules and monitoring code version (for example, /ruxitagentjs_ICA1589ENPQRTUVXfghqru_10307250124095659.js or /contextroot/ruxitagentjs_ICA1589ENPQRTUVXfghqru_10307250124095659.js).
If the RUM JavaScript is inserted manually even though your process groups are instrumented with OneAgent, the monitoring code, like with automatic injection, is requested from your web or application server using a root-relative URL where the filename starts with ruxitagentjs_. The only exception here is the snippet format JavaScript tag, where the RUM monitoring code is requested from the CDN and the filename ends with _complete.js. The Session Replay Classic monitoring code is requested from your web or application server and has a filename starting with ruxitagentjs_ for all snippet formats.
In certain scenarios, you may need to use an alternative monitoring code source configuration. For example:
The following configuration options allow you to address these constraints.
Depending on your infrastructure and its configuration, it's possible that requests for monitoring code can't pass with their automatically chosen URL path and thus can't be handled by OneAgent. To solve this, you can change the part of the URL path that comes before the ruxitagentjs_ prefix.
To modify the RUM monitoring code URL path for an auto-injected frontend
Go to
Experience Vitals.
Select Web to view all web frontends.
Select the frontend you want to configure.
On the Settings tab, select Automatic injection.
In the Real User Monitoring code source dropdown list, select OneAgent.
In Specify path for RUM monitoring code, enter the relative monitoring code URL path.
Select Save.
For example, if the monitoring code for your frontend is currently requested from /ruxitagentjs_ICA1589ENPQRTUVXfghqru_10307250124095659.js and you enter /custompath, it will be requested from /custompath/ruxitagentjs_ICA1589ENPQRTUVXfghqru_10307250124095659.js. You can't eliminate the ruxitagentjs_ICA1589ENPQRTUVXfghqru_10307250124095659.js part, which is necessary for the identification of the request as a monitoring code request.
This configuration is not only effective for automatic injection, but also for manual insertion for pages of an auto-injected frontend. The only exception is the _complete.js request for the JavaScript snippet format, which will still go to the Dynatrace CDN.
Note that all connected ActiveGates must be on ActiveGate version 1.310+ for at least 30 days before this feature becomes available.
If you want the monitoring code for an auto-injected frontend to be requested from the Dynatrace CDN instead of OneAgent, follow the steps below.
Experience Vitals.This configuration is effective for both automatic injection and manual insertion for pages of an auto-injected frontend. Using it, filenames previously starting with ruxitagentjs_ will start with ruxitagent_ instead.
After changing the monitoring code filename prefix, you may experience a temporary reduction in collected RUM data. Therefore, we recommend avoiding frequent changes to this setting.
By default, the monitoring code filename is prefixed with ruxitagent or ruxitagentjs, unless the snippet format JavaScript tag is used. Alternatively, you can specify a custom prefix, which will be used instead for both agentless and auto-injected frontends, as well as for both RUM and Session Replay Classic monitoring code.
To specify a custom monitoring code filename prefix