cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
maliborskaya
Dynatrace Advisor
Dynatrace Advisor

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.

Tip: Before performing any troubleshooting, try checking the health check page for your application. Also, see RUM JavaScript injection | Frequently asked questions in Dynatrace Documentation.

To confirm that your application web frontend process is monitored

  1. In Dynatrace, go to Settings > Monitoring > Monitoring overview.
  2. Switch to the Process groups tab and search for the required process group. All monitored processes are listed on this page.

RUM data is ending up in wrong application

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.

I don't see my applications or RUM data in Dynatrace

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 processes (web server, Java, Node.js, and more). To do this, interact with one of your application pages to generate some traffic.

Once you're certain that your web frontend processes have traffic on them, check the following to determine the cause of the problem:

Note: 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.

RUM JavaScript isn't injected

Try verifying again whether the RUM JavaScript has been correctly injected into your HTML code.

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.

  • Dynatrace OneAgent could not identify the content as HTML or canceled the injection attempt due to an invalid HTML structure or incorrect encodings. See RUM JavaScript injection to learn how OneAgent injects the RUM JavaScript into your application.
  • The request maps to a different application than expected because application detection was set up incorrectly. Either the pattern is incorrect, or the associated web servers operate behind proxies or other components that are rewriting the URL. For details, see What can I do if an uninstrumented component rewrites parts of the URL?.
  • The application that is detected by OneAgent on the first instrumented tier is not propagated to subsequent OneAgents because the x-dynatrace-application header is removed by a firewall or proxy.
  • You have defined exclusion rules for browsers, robots, and spiders.

RUM JavaScript isn't downloadable

Try confirm whether the RUM JavaScript has downloaded correctly.

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.

    • The RUM JavaScript host https://js-cdn.dynatrace.com isn't reachable for client browsers due to firewall rules or proxy server configuration. Connections to and from the host must be allowed.
  • For automatic injection on web servers

    • Rules on firewalls, load balancers, or proxies aren't configured to allow RUM JavaScript download.

  • For automatic injection on Java application servers

    • Root application doesn't exist. The RUM JavaScript is usually loaded from the web server root path (.../ruxitagentjs_...).
    • 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

  1. Go to Web.

  2. Select the application that you want to configure.

  3. In the upper-right corner of the application overview page, select More () > Edit.

  4. From the application settings, select Capturing > Advanced setup.

  5. Scroll down to the RUM monitoring code section.

  6. Specify the source path for placement of your application's RUM monitoring code in the Specify path for RUM monitoring code field. This path needs to point to a location where the RUM JavaScript is accessible (for example, a valid servlet path).
    RUM_monitoring_code_path.png

RUM JavaScript doesn't report data to server

Try confirming again whether that RUM data is sent to Dynatrace.

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.

  • Dynatrace throttled the capture rate of your application.
  • 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.

RUM JavaScript isn't executing

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.

After setting up OneAgent for Real User Monitoring, my application isn't working

If your application isn't working under this scenario, see if the application works with the RUM JavaScript disabled. To do this, block the request using either Fiddler or Chrome DevTools.

  1. In Chrome DevTools, go to the Network tab.

  2. Select More () > Network request blocking.

  3. 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.
    rum-troubleshoot-cors-requestblockingchrome-1455-2cb3ad0e75

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.

Version history
Last update:
‎08 May 2024 11:19 AM
Updated by:
Comments
Kenny_Gillette
DynaMight Leader
DynaMight Leader

Wow, great doc!  Definitely saving this.

Taylor-Sanchez
Dynatrace Mentor
Dynatrace Mentor

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!

GerardJ
Advisor

Really great work! Many thanks to you

tijust1
Advisor

Very helpful.