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.
Solved! Go to Solution.
You can disable JS auto-update function in Settings -> Preferences -> Oneagent updates.
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.
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.