# Adding custom tags to RUM data

**URL:** <https://discuss.elastic.co/t/adding-custom-tags-to-rum-data/370286>\
**Category:** APM\
**Tags:** rum\
**Created:** [November 10, 2024, 2:03pm UTC](https://discuss.elastic.co/t/adding-custom-tags-to-rum-data/370286 "2024-11-10T14:03:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_Peterson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mike_peterson/32/139082_2.png) [@Mike\_Peterson](https://discuss.elastic.co/u/Mike_Peterson)\
**Post date:** [November 10, 2024, 2:03pm UTC](https://discuss.elastic.co/t/adding-custom-tags-to-rum-data/370286/1 "2024-11-10T14:03:22Z")

</div>

Hi. Is it possible to add custom headers to the data the RUM agent sends from the frontend application - for things like the name of a frontend test making a browser request, or the release version of the frontend application in which RUM is instrumented?

I would like to get that data as part of the span data to better track context of the spans created in Elastic. Wondering if this could provide trace-based testing without the need for a dedicated tool for that purpose.  
Thanks!

---

<div class="post-metadata">

**Author:** ![ashishtiwari1993](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashishtiwari1993/32/135241_2.png) [@ashishtiwari1993](https://discuss.elastic.co/u/ashishtiwari1993)\
**Post date:** [November 11, 2024, 4:41am UTC](https://discuss.elastic.co/t/adding-custom-tags-to-rum-data/370286/2 "2024-11-11T04:41:53Z")

</div>

Hey @Mike_Peterson, Welcome to the Elastic community. I think you can use [setUserContext()](https://www.elastic.co/guide/en/apm/agent/rum-js/current/agent-api.html#apm-set-user-context) or [setCustomContext()](https://www.elastic.co/guide/en/apm/agent/rum-js/current/agent-api.html#apm-set-custom-context) to record the same. Let us know if that helps.

---

<div class="post-metadata">

**Author:** ![Mike\_Peterson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mike_peterson/32/139082_2.png) [@Mike\_Peterson](https://discuss.elastic.co/u/Mike_Peterson)\
**Post date:** [November 11, 2024, 7:45pm UTC](https://discuss.elastic.co/t/adding-custom-tags-to-rum-data/370286/3 "2024-11-11T19:45:10Z")

</div>

Thanks @ashishtiwari1993! I will check those out.
