on
20 Mar 2024
05:20 PM
- edited on
11 Jul 2025
08:16 AM
by
Adam-Piotrowicz
This page explains what to do when Real User Monitoring (RUM) isn't working in your environment, specifically when there are issues with the RUM JavaScript.
Before performing any troubleshooting, try checking the health check page for your application.
To confirm that your application web frontend process is monitored
If RUM data is ending up in the wrong application, make sure that you've correctly configured the application detection rules. For details, see Check application detection rules and Define applications for Real User Monitoring | Application detection rules approach.
If you don't see any of your applications or RUM data in the Dynatrace web UI, start by confirming that there's traffic in your web frontend Process Groups (web server, Java, Node.js, and more). To do this, interact with one of your application pages to generate some traffic.
Once you've confirmed that your web frontend processes are receiving traffic, follow the steps below to triage the issue.
Load one of your pages, inspect its source in a web browser, and make sure that the <HEAD> element contains a reference to the RUM JavaScript. To identify the RUM JavaScript, proceed as follows.
Different snippet formats are available for automatic injection. A common characteristic among them is the presence of the string data-dtconfig , either as an attribute or embedded within the code. To verify that the RUM JavaScript has been injected, look for a script element that includes this string.
If you don't see the RUM JavaScript automatically injected by OneAgent into your webpages, check RUM JavaScript isn't injected.
If you're using the snippet format JavaScript tag, search for a script that ends with the string _complete.js and is loaded from js-cdn.dynatrace.com or, in case of Managed, your own CDN. If you use Dynatrace Managed and have not set up your own CDN yet, the script is loaded from a domain in Dynatrace Managed.
If you are using one of the other snippet formats, the string data-dtconfig should be present, either as an attribute or embedded within the code.
If you don't see the RUM JavaScript manually inserted into your webpages, refer to Set up agentless Real User Monitoring.
If you are using the snippet format code snippet and want to check if the second script element containing the full functionality of the monitoring code has been injected successfully, open the Elements tab in the Chrome DevTools and search for an id attribute that contains dtjsagent or dtjsagentdw.
The Dynatrace RUM JavaScript is downloaded along with the other resources of your web page. To confirm that the download was successful, open the Network tab in your browser’s developer tools. Look for a request URL that contains one of the following strings:
The response should have a 200 OK status and the body should contain JavaScript code.
An example is shown in the screenshots below.
If the RUM JavaScript hasn't downloaded correctly, refer to RUM JavaScript isn't downloadable.
To check if the RUM JavaScript has initialized successfully on your page, check whether the dT_ JavaScript object exists. Open your browser developer console, enter dT_ , and press Enter . As a result, an object should be returned. Otherwise, you will find logs in the browser console that help you identify the issue.
The RUM JavaScript sends the captured data as beacon requests—which are HTTP POST requests—to a designated beacon endpoint.
Alternative configurations are possible, see Configure beacon endpoint for web applications.
You can check these requests in the Network tab of your browser's developer tools.
If the beacon requests are handled by OneAgent, look for requests with a URL where the path begins with rb_.
If a Cluster ActiveGate is used, you can identify beacon requests as follows:
Responses should have the 200 OK status, and the response body should start with OK. If the response body starts with FL, the RUM beacon was rejected and not forwarded to the server. The response contains additional information about the problem. For further details, check RUM JavaScript doesn't report data to server.
If you don't see the RUM JavaScript automatically injected by OneAgent into your webpages, it's probably because of one of the following reasons.
If you see that the RUM JavaScript isn't downloadable, there might be a few reasons for that.
For agentless monitoring
The RUM JavaScript is incorrect.
Content Security Policy rules prevent loading of the RUM JavaScript.
For automatic injection on web servers
Rules on firewalls, load balancers, or proxies aren't configured to allow RUM JavaScript download. Refer to Firewall constraints for RUM for details.
For automatic injection on Java application servers
Your Java application server serves static content in a way that doesn't use the servlet stack. In such cases, the RUM JavaScript can't be downloaded.
To resolve a JavaScript download issue caused by a missing root application, configure an accessible path (for example, a valid servlet path) as described in Modify the monitoring code URL path.
If you see that the RUM beacons are rejected and not forwarded to the server, there might be several reasons for that.
Rules on firewalls, load balancers, or proxies may need to be adapted. Refer to Firewall constraints for RUM for details.
Content Security Policy settings may need to be adapted.
Java application server setup may need to be adapted.
For agentless monitoring, your browser may not support CORS requests. Data can be reported only via browsers that support CORS.
Content that is delivered as XHTML (content type application/xhtml+xml) can cause troubles with the injected RUM JavaScript. No CDATA comments (//<![CDATA['...) are injected as XHTML has been deprecated, but this can still cause browsers to not execute the RUM JavaScript. You must manually add the proper CDATA comments for the RUM JavaScript to execute properly.
In rare circumstances, the RUM JavaScript injected into your application pages can have an adverse impact on the application functionality. For this reason, following installation of OneAgent, confirm that your application pages still render properly. If some of your application pages appear to be corrupted, disable RUM and contact a Dynatrace product expert via live chat within your Dynatrace environment.
To help Dynatrace product experts narrow down the issue, you can start with the following initial troubleshooting steps.
Check if the application works if the RUM JavaScript is not loaded and executed. To do this, block the request using either Fiddler or Chrome DevTools.
In Chrome DevTools, go to the Network tab.
Select More (…) > Network request blocking.
Select Enable network request blocking, and then enter part of the URL of the RUM JavaScript, for example, ruxitagent. Note that this does not work for the inlined RUM JavaScript.
If the application doesn't work with the RUM JavaScript disabled, the problem is likely in the application or caused by OneAgent. However, if the application works after disabling the RUM JavaScript, re-enable the RUM JavaScript but disable all modules. Try enabling modules one at a time until the application does not work anymore. Use this information when contacting Dynatrace product experts, as it helps to narrow down the problem to a certain module.
If you continue to see the unexpected behavior after completing all the troubleshooting above, please contact Dynatrace on the in-product chat/ create ticket. Provide the following information:
This is a wonderful reference! Thanks for taking the time to write something like this up - I'm sure a lot of people will find it useful when troubleshooting!
Hi ,
Dynatrace Java script is not injecting for me , we have akamai and another webser , what is the trouble shooting that i can do.
Hi @Amarnadh_Sunkar ,
We had the same situation and we solved it configurating the application as agentless. Here you have the documentation.
Hope it helps.
Regards,
Elena.
Thanks Elena,
I am trying in agentless , do you have any time to connect for 30 minutes.