15 Nov 2023 01:36 PM - edited 16 May 2024 09:06 AM
When enabling RUM on your application sometimes you might notice that you aren't getting data, but once you open the dev-tools on your browser you notice that the "ruxitagentjs" is showing a 404 as its status. The initial culprit here is that the OneAgent is not instrumented on the webserver handling the application.
Solutions:
- If you have multiple webservers handling the application you can try and change the location of the JavaScript library that is capable of handling the request (check the last point to see how you can find other libraries), a way to test if the new path works is to take the initial request of the agent add the new path in the URL and paste it in the browser, if it returns a code then the new path works. For example:
old: https://www.example.com/ruxitagentjs_A237NQVafghjlqrtuxz_10277231024135831.js;
new: https://www.example.com/path/ruxitagentjs_A237NQVafghjlqrtuxz_10277231024135831.js;
Application-> settings -> capturing -> Advanced capture (in the new update this is called "Specify path for RUM monitoring code")
- In the cases where OneAgent is not instrumented on the webservers then the request won't be able to reach an Agent, then it is best to go with a manual or agentless injection to fix the issue.
To find other paths: Open the network tab in the dev-tools and then load the website, and filter by scripts, there you will find other paths that may be used. For example if the page injected is: www.example.com/path/example.aspx ; you can use the "/path".
Very simple and useful. Important for beginners in Dynatrace:) Well done!