Showing results for 
Show  only  | Search instead for 
Did you mean: 

Exclude a domain from auto injection by OneAgent

Dynatrace Contributor
Dynatrace Contributor

OneAgent auto-injects into all the web applications that are being rendered by the server on which the agent is installed. In the case where you have multiple environments running off the same web server and would like to monitor the performance of some domains and not all, it is just a simple switch flip which will override the default behavior of the OneAgent and not inject into the domain of your choice.


Community Team
Community Team

We have multiple ways of achieving this in Dynatrace:

  1. From the Burger menu on the top right hand corner of your environment, go to Monitoring Settings. Under these settings you can stop the injection in two ways:
    1. Go to Process Groups: Select the process which is rendering the end user pages (Nginx, Apache, Node.js) and click on the Edit button. Under these settings find the option to turn off Automatically inject real user monitoring JavaScript tag
    2. Go to Applications: Find the domain for which you do not want the Real User Monitoring tag to be injected turn the Monitoring switch off. In order for you to see the domain in this list of Applications, create an application for that domain first.

2. Dynatrace can also inject into certain pages based on the URL. This can be done by going to the Application in which you want to make the injection changes. Click on the Edit button located on the header. Navigate to Advanced Setup and add a rule for JavaScript Injection as shown:

Once the setting is made, you can be assured that the OneAgent will not auto-inject into the specified domain and also not provide any real user monitoring metrics for the same.


Keep calm and build Community!

Featured Posts