# APM Rum agent source maps for multiple subdomains

**URL:** <https://discuss.elastic.co/t/apm-rum-agent-source-maps-for-multiple-subdomains/160426>\
**Category:** APM\
**Created:** [December 11, 2018, 6:17pm UTC](https://discuss.elastic.co/t/apm-rum-agent-source-maps-for-multiple-subdomains/160426 "2018-12-11T18:17:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![estevez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/estevez/32/47746_2.png) [@estevez](https://discuss.elastic.co/u/estevez)\
**Post date:** [December 11, 2018, 6:17pm UTC](https://discuss.elastic.co/t/apm-rum-agent-source-maps-for-multiple-subdomains/160426/1 "2018-12-11T18:17:44Z")

</div>

When uploading the the source map for the clientside js RUM agent you need to specify:

- service\_name
- service\_version
- bundle\_filepath

As part of my applications deploy process I upload a new source map with a consistent service name and version. When my agent initializes it uses the same service\_name & service\_version.

However my application uses many different subdomains so there is never a consistent bundle\_filepath. For example if I use "[https://mywebsite/assets/app.js](https://mywebsite/assets/app.js)" when I upload the sourcemap and have "[https://subdomain-one.mywebsite/assets/app.js](https://subdomain-one.mywebsite/assets/app.js)" report an error it shows in the log that it can't find the sourcemap that matches my service name, service version and path "[https://subdomain-one.mywebsite/assets/app.js](https://subdomain-one.mywebsite/assets/app.js)"

Is there anyway to fix this issue?

---

<div class="post-metadata">

**Author:** ![Hamidreza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hamidreza/32/21369_2.png) [@Hamidreza](https://discuss.elastic.co/u/Hamidreza)\
**Post date:** [December 12, 2018, 8:36am UTC](https://discuss.elastic.co/t/apm-rum-agent-source-maps-for-multiple-subdomains/160426/2 "2018-12-12T08:36:18Z")

</div>

Hi Steven,

Thanks for your interest in Elastic APM.

You should be able to upload the same sourcemap file for multiple `bundle_filepath` and APM server would find the appropriate sourcemap for each subdomain.

Cheers,  
Hamid

---

<div class="post-metadata">

**Author:** ![estevez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/estevez/32/47746_2.png) [@estevez](https://discuss.elastic.co/u/estevez)\
**Post date:** [December 12, 2018, 4:03pm UTC](https://discuss.elastic.co/t/apm-rum-agent-source-maps-for-multiple-subdomains/160426/3 "2018-12-12T16:03:04Z")

</div>

Hi @Hamidreza,

Thank you for your response. Unfortunately we have hundreds of subdomains so it would not be practical to upload a sourcemap for all of them.

---

<div class="post-metadata">

**Author:** ![Hamidreza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hamidreza/32/21369_2.png) [@Hamidreza](https://discuss.elastic.co/u/Hamidreza)\
**Post date:** [December 13, 2018, 10:01am UTC](https://discuss.elastic.co/t/apm-rum-agent-source-maps-for-multiple-subdomains/160426/4 "2018-12-13T10:01:11Z")

</div>

Unfortunately, uploading multiple files is our only solution to this problem. However I've opened [this issue](https://github.com/elastic/apm-server/issues/1649) in the APM Server repo to keep track of this feature request.

Please feel free to comment on the issue.

Cheers

---

<div class="post-metadata">

**Author:** ![estevez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/estevez/32/47746_2.png) [@estevez](https://discuss.elastic.co/u/estevez)\
**Post date:** [December 14, 2018, 9:42pm UTC](https://discuss.elastic.co/t/apm-rum-agent-source-maps-for-multiple-subdomains/160426/5 "2018-12-14T21:42:55Z")

</div>

Thanks for opening up the issue. Hopefully we can get this feature added, anyone that uses different subdomains per client will have the same problem.

---

<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:** [January 4, 2019, 5:43pm UTC](https://discuss.elastic.co/t/apm-rum-agent-source-maps-for-multiple-subdomains/160426/6 "2019-01-04T17:43:02Z")

</div>

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