# Using the same APM Server for Multiple Environments

**URL:** <https://discuss.elastic.co/t/using-the-same-apm-server-for-multiple-environments/280920>\
**Category:** APM\
**Tags:** rum, server\
**Created:** [August 10, 2021, 11:54am UTC](https://discuss.elastic.co/t/using-the-same-apm-server-for-multiple-environments/280920 "2021-08-10T11:54:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![happyinteger](https://avatars.discourse-cdn.com/v4/letter/h/898d66/32.png) [@happyinteger](https://discuss.elastic.co/u/happyinteger)\
**Post date:** [August 10, 2021, 11:54am UTC](https://discuss.elastic.co/t/using-the-same-apm-server-for-multiple-environments/280920/1 "2021-08-10T11:54:55Z")

</div>

Hello,  
I'm just wondering that is it possible to use one APM server for multiple environments like dev, test, staging. I'm not sure that it's the best practice but for non-prod environments I want to use one common APM server and if possible labeling each environment like below. For my javascript application that uses RUM agent, how should I configure the environment information (like in the Example .NET application in screenshot)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/8/08b04fe7a43cdb987fa07246b34e180fb2f5960e.png)

**Kibana version** : 7.12.1

**Elasticsearch version** : 7.12.1

**APM Server version** : 7.9.1

**APM Agent language and version** : Javascript React, @elastic/apm-rum-react@1.2.5

**Browser version** : Opera 77

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Ramon\_Sanchez\_Villan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ramon_sanchez_villan/32/48235_2.png) [@Ramon\_Sanchez\_Villan](https://discuss.elastic.co/u/Ramon_Sanchez_Villan)\
**Post date:** [August 10, 2021, 11:55pm UTC](https://discuss.elastic.co/t/using-the-same-apm-server-for-multiple-environments/280920/2 "2021-08-10T23:55:06Z")

</div>

For our expirence using anything relate to monitoring with Elastic APM, you can use one variable availiable into each APM agent like RUM JS, Java, .NET, NodeJS, etc. Check this below links:

For RUM JS check this URL: [Configuration | APM Real User Monitoring JavaScript Agent Reference [master] | Elastic](https://www.elastic.co/guide/en/apm/agent/rum-js/master/configuration.html#environment)

For .NET check this URL: [Core configuration options | APM .NET Agent Reference [1.11] | Elastic](https://www.elastic.co/guide/en/apm/agent/dotnet/current/config-core.html#config-environment)

Using that variable "Environment" since each APM Agent you can set from which environment are sending information like Production, Staging, QA, Testing, Development or other value whatever you want to use.

I hope this can help you and reply if you need more information.

---

<div class="post-metadata">

**Author:** ![happyinteger](https://avatars.discourse-cdn.com/v4/letter/h/898d66/32.png) [@happyinteger](https://discuss.elastic.co/u/happyinteger)\
**Post date:** [August 11, 2021, 9:53am UTC](https://discuss.elastic.co/t/using-the-same-apm-server-for-multiple-environments/280920/3 "2021-08-11T09:53:35Z")

</div>

Thank you that's what I'm looking for 🙂

---

<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 1, 2021, 5:54am UTC](https://discuss.elastic.co/t/using-the-same-apm-server-for-multiple-environments/280920/4 "2021-09-01T05:54:33Z")

</div>

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