Use of the property introscope.agent.dotnet.runInRestrictedMode with dotnet agent

Document ID : KB000100027
Last Modified Date : 04/06/2018
Show Technical Document Details
Introduction:
In the APM document:

https://docops.ca.com/ca-apm/10-7/en/implementing-agents/microsoft-net-agent/configure-the-net-agent/customize-net-instrumentation

In  following session 
5.Add this property to the IntroscopeAgent.profile and set it to false:

introscope.agent.dotnet.runInRestrictedMode=false


We could not find the exact use of this property in this documentation. Please clarify this property meaning.
Question:
What is the use of property-
introscope.agent.dotnet.runInRestrictedMode=false
when instrumenting processes or applications that run outside of IIS?
Answer:
You can use introscope.agent.dotnet.runInRestrictedMode=false when you need to disable some apps and enable others.

You can do it by pointing IIS app's web.config (app settings) to another agent profile with runInRestrictedMode=false and monitor only this specific app while keeping runInRestrictedMode=true in the org profile.

Here's an example.

You have multiple applications running in the same app pool and You’d like to disable monitoring on all the apps and keep data coming only for one of them.

 1. Refer the app to be monitored to another agent profile by modifying web.config according to sample supplied with the .NET agent installer (Sample.exe.config):
 <configSections>
 <sectionGroup name="com.wily.introscope.agent">
 <section name="env.parameters"
 type="System.Configuration.NameValueSectionHandler,System,Version=1.0.5000.0,Culture=neutral,PublicKeyToken=b77a5c561934e089" />
 </sectionGroup>
 </configSections>

 <com.wily.introscope.agent>
 <env.parameters>
 <add key="com.wily.introscope.agentProfile" value="<PATH_TO_MY_CUSTOM_PROFILE>\\IntroscopeAgent.profile" />
 </env.parameters>
 </com.wily.introscope.agent>

2. Modify original agent profile to disable monitoring for all other apps: 
 introscope.agent.dotnet.runInRestrictedMode=true

3. Access any apps.
 You should see data only for the app that has runInRestrictedMode=false or apps without this property, which is by default=false.