Sometimes you might encounter issues with RUM injection by OneAgent. This may have different reasons.
Use the dtHealthCheck as the user-agent header in your request to validate the injection. For example:
curl --user-agent "dtHealthCheck" https://your.site -v -o /dev/null
Then check the response headers. It should contain the x-dthealthcheck headers such as:
x-dthealthcheck: OK|0xd75620e4e0330b23
x-dthealthcheck: ALREADY_INJECTED_HEADER_FOUND|0xea94eb939e4beabd
These contain useful information - if the injection was tried and what was the result. In this example, RUM was injected by an application server and also tried on the webserver, but it was already injected.
A lot of RUM injection errors can be diagnosed this way.
If you are still not successful with the RUM JavaScript injection, check:
- if the agent is deployed and application processes restarted
- if you have remaining DEM licenses in your environment as injection won't happen if there are no remaining DEM licenses
- check your application detection rules in Settings > Web and mobile monitoring > Application detection and check if the application URL resolves to the desired application in Dynatrace
- check if the Application in Dynatrace is enabled
- check if injection for the process groups where it should happen is enabled
- some Java web frameworks (ZK framework for example) already produce compressed output and Dynatrace is unable to inject there. You can try to issue the request without Accept-Encoding header and check if the injection is performed or not.
- Some built-in Java webservers such as undertow in certain combinations have issues with injection. Try setting the Deep Monitoring flag "Java Real user monitoring v2" for the process groups.
Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner