🚀 DevOps & SRE Certification Program 📅 Starting: 1st of Every Month 🤝 +91 8409492687 🔍 Contact@DevOpsSchool.com

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

How to disable newrelic agent completly or disable for specific app in dotnet?

Note: any changes you make to the configuration files require an iisreset or IIS restart.

Method 1 – .NET Agent – The method to disable the agent depends on if you are using Framework or Core:

Please check a image below;

Method 2 - .NET Agent - To exclude an app from being monitored by the .NET Agent, add this to that apps’s web.config:

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

Method 3 - .NET Agent - 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>

Method 4 - .NET Agent - 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>

Method 5 - .NET Agent - You can disable the agent in the App specific newrelic.config file. You can have newrelic.config file at app level as well. Sometimes, we 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=“false"
  maxStackTraceLines="50"
  timingPrecision="high">

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.