Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Relic Solution: How can I disable the Agent for some applications on my Server?

level-up

#1

You have a couple of options here for disabling the agent for only certain applications.

Option 1: You can exclude the app pool via the newrelic.config

Here is an example of disabling instrumentation for specific application pools:

<applicationPools>
  <applicationPool name="Foo" instrument="false"/>
  <applicationPool name="Bar" instrument="false"/>
</applicationPools>

Here is an example of disabling instrumentation for all application pools currently executing on the server and enabling instrumentation for specific application pools:

<applicationPools>
  <defaultBehavior instrument="false"/>
  <applicationPool name="Foo" instrument="true"/>
  <applicationPool name="Bar" instrument="true"/>
</applicationPools>

Option 2: You can disable the agent in the web.config file

<appSettings>
    <add key="NewRelic.AgentEnabled" value="false" />
  </appSettings>

Option 3: You can disable the agent in the local newrelic.config file - Some customers do not want to make changes in their web.config files; you can copy the global newrelic.file into the root directory of your app and make instrumentation changes there

<configuration xmlns="urn:newrelic-config"
  agentEnabled="true"
  maxStackTraceLines="50"
  timingPrecision="high">

HERE is more information about instrumentation options.

Note - any changes you make to the configuration files require an iisreset to take effect.