11 Nov 2019 12:59 PM
Hi,
Is there way to control the update of JS agent per application? We multiple application (Web and Mobile) with manual JS injection enable. We are using JavaScript tag as insertion method. Async code snippet is avoided as it sometime do not instrument all the requests.
Every time cluster is updated, agent load the new JS in the app code. However, the configured URL is older version. Due to this we can see double JS injection happening. I know dynatrace handle this smoothly but still load time of extra 300ms is still noticeable.To overcome this we have to update the JS agent with latest version.
Thanks
Suresh
Solved! Go to Solution.
11 Nov 2019 08:21 PM
You can disable JS auto-update function in Settings -> Preferences -> Oneagent updates.
It's a separate setting for Oneagents and for JavaScript library.
With the default settings the RUM JS library gets updated at least every month when new major cluster version is deployed. You override this setting and do manual updates, but those updates apply for each application within the environment. You cannot have different versions of the JavaScript library set in one tenant except when the injection is done manually. You can only set the version to be used in your environment. The change happens dynamically, within seconds across your whole environment.
Regarding the auto-update and manual injection - I do not know your setup, but I guess you are using manual instrumentation and automatic instrumentation for your apps at the same time. Depending on your configuration you should either use automatic injection or do the manual injection in your build and disable automatic injection at the process level. An automatic injection is preferred and you can specify rules for the pages where the injection should not happen.
Double RUM JS injection should definitely not happen at all in any environment.
17 Feb 2022 08:51 AM
Maybe this is not answering all questions: we still can't control the JS version per application with automatic injection. To my experience the JS agent is the thing that now and then breaks applications. Customers would like to test a new version on a test stage first. Setup is devops-like: all stages in one environment.
cheers,
Torsten
14 Apr 2023 11:58 AM
Since 1.252, it is possible to set the JS Agent version at the tenant level, using WebUI> Settings> Web & Mobile Monitoring> RUM JavaScript updates, and then these setting can be overriden per application in WebUI> Application> Settings> Injection> RUM JavaScript updates