# RUM trace through iframe

**URL:** <https://discuss.elastic.co/t/rum-trace-through-iframe/313099>\
**Category:** APM\
**Created:** [August 28, 2022, 3:01pm UTC](https://discuss.elastic.co/t/rum-trace-through-iframe/313099 "2022-08-28T15:01:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![soandosps](https://avatars.discourse-cdn.com/v4/letter/s/aeb1de/32.png) [@soandosps](https://discuss.elastic.co/u/soandosps)\
**Post date:** [August 28, 2022, 3:01pm UTC](https://discuss.elastic.co/t/rum-trace-through-iframe/313099/1 "2022-08-28T15:01:01Z")

</div>

I am trying to get the RUM JS agent to follow through iframes, and I am running into some difficulties.

As far as I can tell, RUM does not work by default on resources, so something like `<iframe src="some/local/path"/>` does not work (if there is an option I am missing that fixes that, the rest of this question is irrelevant).

What I then tried to do was create an XHR request for the `some/local/path`, and then use `URL.createObjectURL` for the `src` on the iframe. That works in the sense that RUM now picks up the request, and adds the headers, but the frame seems broken (doesn't seem to run any of the JS that is returned?).

What is the best way to do this? I don't have the ability to remove any of the framing, and all resources are on the same host.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 25, 2022, 3:01pm UTC](https://discuss.elastic.co/t/rum-trace-through-iframe/313099/2 "2022-09-25T15:01:03Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
