11 Oct 2023
08:44 AM
- last edited on
13 Dec 2023
10:55 AM
by
Ana_Kuzmenchuk
We have found an issue when using kuberneres+OneAgent+RUM injection with some applications. Support helped us to eliminate possible causes and to narrow in on caching at the AFD level.
When caching is enabled, RUM injection does not work. If we disable caching on AFD, RUM Injection works every time.
To circumvent this issue, we've resorted to manual JavaScript injection.
Has anyone come across an alternative solution for this challenge?
Solved! Go to Solution.
13 Dec 2023 11:05 AM - edited 13 Dec 2023 11:05 AM
Hi @GregOReilly, were you able to find an alternative solution for this issue? Thank you!
13 Dec 2023 11:13 AM
Hello Anna, manual injection was the only method that worked. Using Oneagent and automated injection of Javascript did not work with Cache enabled on Azure Front Door(s).
25 Mar 2025 04:11 PM
Hi,
We had this same issue and we seem to have solved it by:
14 Jul 2025 02:55 PM - edited 15 Jul 2025 08:10 AM
Thanks for raising this, Greg.
When you say "RUM injection does not work", I interpret that to mean the RUM JavaScript snippet is not injected into the page at all. Based on the setup, I suspect this is due to an unfavorable caching policy: the page is likely being served from the edge cache for an extended period, so the request never reaches the origin — and the OneAgent never gets a chance to inject the snippet.
The fact that manual insertion worked could be due to a few reasons:
Tom mentioned they had a similar issue, but the solution he described only works if the RUM JavaScript snippet was already injected, and only the request for the RUM monitoring code itself did not reach the origin. So his case shows that RUM injection can work with Azure Front Door, and the issue here is likely more about caching behavior than a fundamental incompatibility.
To me, this sounds like a classic CDN-related scenario we've seen before: The OneAgent can't inject as long as the page is served from the edge. Except for waiting for the cache to expire, the only solutions are:
👉 Greg, please correct me if I misunderstood what you meant by "RUM injection does not work."