# How RUM and APM works

**URL:** <https://discuss.elastic.co/t/how-rum-and-apm-works/373846>\
**Category:** APM\
**Tags:** rum\
**Created:** [January 29, 2025, 4:14pm UTC](https://discuss.elastic.co/t/how-rum-and-apm-works/373846 "2025-01-29T16:14:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![GinkoLucas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ginkolucas/32/107055_2.png) [@GinkoLucas](https://discuss.elastic.co/u/GinkoLucas)\
**Post date:** [January 29, 2025, 4:14pm UTC](https://discuss.elastic.co/t/how-rum-and-apm-works/373846/1 "2025-01-29T16:14:11Z")

</div>

Hi,

I need your help to understand how RUM works. I've seen it linked to APM, but I know very little about APM.  
Can someone describe how RUM works and how to use it?

Thank you very much.

---

<div class="post-metadata">

**Author:** ![Justin\_Castilla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/justin_castilla/32/135379_2.png) [@Justin\_Castilla](https://discuss.elastic.co/u/Justin_Castilla)\
**Post date:** [January 30, 2025, 4:51pm UTC](https://discuss.elastic.co/t/how-rum-and-apm-works/373846/2 "2025-01-30T16:51:02Z")

</div>

Hi @GinkoLucas , great question!

So this is our pitch from our docs site [here](https://www.elastic.co/guide/en/observability/current/apm-rum.html):

_"Real User Monitoring captures user interaction with clients such as web browsers. The [JavaScript Agent](https://www.elastic.co/guide/en/apm/agent/rum-js/5.x) is Elastic’s RUM Agent._

_Unlike Elastic APM backend agents which monitor requests and responses, the RUM JavaScript agent monitors the real user experience and interaction within your client-side application. The RUM JavaScript agent is also framework-agnostic, which means it can be used with any front-end JavaScript application._

_You will be able to measure metrics such as "Time to First Byte", `domInteractive`, and `domComplete` which helps you discover performance issues within your client-side application as well as issues that relate to the latency of your server-side application."_

So in my words, APM monitors and traces a back end system while RUM monitors real-time user activity on the front-end (browser) using Javascript. This means creating distributed tracing of front end navigation and metrics of performance (loads, paints, etc.)

[Here's](https://www.elastic.co/guide/en/apm/agent/rum-js/current/intro.html) our docs to get up and running with RUM. I'd check out the distributed tracing and breakdown metrics sections in particular to get a good handle on things.

Let me know if this helps!

---

<div class="post-metadata">

**Author:** ![GinkoLucas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ginkolucas/32/107055_2.png) [@GinkoLucas](https://discuss.elastic.co/u/GinkoLucas)\
**Post date:** [January 31, 2025, 5:00pm UTC](https://discuss.elastic.co/t/how-rum-and-apm-works/373846/3 "2025-01-31T17:00:07Z")

</div>

Thank you for your help.

Can RUM be used without APM?

---

<div class="post-metadata">

**Author:** ![Justin\_Castilla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/justin_castilla/32/135379_2.png) [@Justin\_Castilla](https://discuss.elastic.co/u/Justin_Castilla)\
**Post date:** [January 31, 2025, 9:05pm UTC](https://discuss.elastic.co/t/how-rum-and-apm-works/373846/4 "2025-01-31T21:05:12Z")

</div>

I think there is a possibility to send RUM telemetry data to Elasticsearch directly, with an ingest pipeline to convert the data for ES consumption, but I've never tried it. You could even theoretically use an OTel collector as an intermediary to handle data processing, but again, that's untried and untested. You won't have the automatic correlations, visualizations, and out of the box Observability features that APM offers, but it might work.

Out of curiosity, is there any particular goal for implementing RUM with APM? Sounds like an interesting use-case.

---

<div class="post-metadata">

**Author:** ![GinkoLucas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ginkolucas/32/107055_2.png) [@GinkoLucas](https://discuss.elastic.co/u/GinkoLucas)\
**Post date:** [February 3, 2025, 9:06am UTC](https://discuss.elastic.co/t/how-rum-and-apm-works/373846/5 "2025-02-03T09:06:16Z")

</div>

Thx for your help.

I only need to get user metrics, so APM may not be mandatory. But from what I understand, it's still easier to use RUM with APM, so I'll do this.

So if I understand correctly, there's a script (RUM) in the HTTP requests (requests sent to the back-end), and in the back-end is the APM agent, right?

---

<div class="post-metadata">

**Author:** ![GinkoLucas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ginkolucas/32/107055_2.png) [@GinkoLucas](https://discuss.elastic.co/u/GinkoLucas)\
**Post date:** [February 4, 2025, 9:52am UTC](https://discuss.elastic.co/t/how-rum-and-apm-works/373846/6 "2025-02-04T09:52:22Z")

</div>

I'll answer that for myself : RUM is front-end, and that's all. There nothing in the back, just an APM server on my Elastic Cloud deployment.

---

<div class="post-metadata">

**Author:** ![Justin\_Castilla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/justin_castilla/32/135379_2.png) [@Justin\_Castilla](https://discuss.elastic.co/u/Justin_Castilla)\
**Post date:** [February 4, 2025, 10:11pm UTC](https://discuss.elastic.co/t/how-rum-and-apm-works/373846/7 "2025-02-04T22:11:56Z")

</div>

If there ever is a need, you may extend your RUM into your back-end as they will propagate a `trace-id` you would use to to see the entire path of your user's actions and impact. This might be useful in the future if you want to track user metrics and their impact on your application's performance. Glad I could help!

---

<div class="post-metadata">

**Author:** ![GinkoLucas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ginkolucas/32/107055_2.png) [@GinkoLucas](https://discuss.elastic.co/u/GinkoLucas)\
**Post date:** [February 4, 2025, 10:36pm UTC](https://discuss.elastic.co/t/how-rum-and-apm-works/373846/8 "2025-02-04T22:36:47Z")

</div>

Oh that's interesting, can you tell me more?
