Configure Monitoring for Multiple Application Domains

If the application you monitor contains multiple AppDomains, the App Agent for .NET automatically instruments each AppDomain and creates a node. You can configure the .NET Agent to instrument only the AppDomains you specify. Use this to exclude AppDomains you do not want to monitor, and to limit the number of nodes in a tier.

You can configure application domain monitoring for:

  • Windows Services
  • Standalone Applications

Configure all instrumentation settings for the .NET Agent in the config.xml file. See Administer the .NET Agent.

  1. Identify the name of the AppDomains to instrument.
    Note: I

    If you have already instrumented your application, the AppDomain names display in the Node Dashboard.

    Click the node in the left navigation pane, then click CLR.

    Instrumentable AppDomains
  2. Launch a text editor as administrator.
  3. Edit the config.xml file as an administrator. See Administer the .NET Agent.
  4. Find the element that corresponds to your application with multiple AppDomains: Standalone Application element: <standalone-application executable="MyWindowsApplication.exe">
  5. Add the app-domain-name MyApp.exe AppDomain MyApp.exe
    CODE
    <standalone-application executable="MyApp.exe" app-domain-name="MyApp.exe">
    <tier name="StandaloneApplication Tier"/>
    </standalone-application>
    Note: As soon as you instrument one AppDomain in the config.xml file, the agent instruments only the AppDomains you specify. Other AppDomains are not instrumented.
  6. To instrument additional AppDomains, add an element for each AppDomain as if they were separate applications.For example, to instrument MyAppDomain1 MyApp.exe
    CODE
    <standalone-application executable="MyApp.exe" app-domain-name="MyAppDomain1">
    <tier name="StandaloneApplication Tier"/>
    </standalone-application>
  7. Save the config.xml file.
  8. Restart the AppDynamics.Agent.Coordinator service.
  9. Restart instrumented applications: Windows services or standalone applications.
Sample Standalone Application Configuration with Multiple AppDomains

This sample config.xml MyApp.exe config.xml MyApp.exe MyAppDomain2Standalone AppDomain (Sample)

XML
<?xml version="1.0" encoding="utf-8"?>
<appdynamics-agent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<controller host="mycontroller.mycompany.com" port="8090" ssl=false">
<account name="customer1" password="changeme" />
<application name="MyDotNetApplication" />
</controller>
<machine-agent />
<app-agents>
<standalone-applications>
<standalone-application executable="MyApp.exe" app-domain-name="MyApp.exe">
<tier name="StandaloneApplication Tier"/>
</standalone-application>
<standalone-application executable="MyApp.exe" app-domain-name="MyAppDomain2">
<tier name="StandaloneApplication Tier"/>
</standalone-application>
</standalone-applications>
</app-agents>
</appdynamics-agent>