To monitor an application executed on Windows, you install the AppDynamics .NET Core microservices agent for Windows to your project. Additionally, you can instrument .NET standalone services or IIS services using the MSI installer. Then, set the environment variables for your Controller.

Install the .NET Core Microservices Agent

Before you install the .NET Core microservices agent, ensure that you have access to the AppDynamics Controller where your application metrics will display.

You can deploy the .NET Core microservices agent using either of these methods:

  • Deploy the .NET Core microservices agent during development using IDE and Visual Studio
  • Deploy the .NET Core microservices agent separately to different development teams to divide controls, pipelines, and CI/CD processes

Deploy the .NET Core Microservices Agent During Development

  1. Install the AppDynamics.Agent.Windows NuGet package in your project. See your IDE documentation.

    When you install the NuGet package, the AppDynamicsConfig.json file is copied to the project's root directory. A link file prefixed with the project name is included as content to the project. All the files are copied to the app's output directory after the build. 

  2. Set up these environment variables for your system application:

    CORECLR_ENABLE_PROFILING=1
    CORECLR_PROFILER={39AEABC1-56A5-405F-B8E7-C3668490DB4A}
    CORECLR_PROFILER_PATH_32=<actual_path>\AppDynamics.Profiler_x86.dll
    CORECLR_PROFILER_PATH_64=<actual_path>\AppDynamics.Profiler_x64.dll

    Where <actual_path> is the complete path to the AppDynamics.Profiler dll.

  3. Open the AppDynamicsConfig.json file and update the file with your AppDynamics Controller information.
    AppDynamics Config.json File
  4. Use these options to configure the .NET Agent to connect to the AppDynamics Controller:

    • During development: As shown in the previous screenshot, you can enter your environment variables in the AppDynamicsConfig.json file, and save it in source control.
    • During build: Define your msbuild parameters or environment variables that are passed to the AppDynamicsConfig.json file at build time. The AppDynamicsConfig.json file does not exist at build time, so if you are defining your msbuild parameters or environment variables at build time, you will need to ignore it in source control so that the new AppDynamicsConfig.json file can be created.
    • During runtime: Enter your environment variables in Azure.
  5. Deploy the application.

Deploy the .NET Core Microservices Agent Separately to Different Development Teams

By using this deployment method, you divide controls, pipelines, and CI/CD processes among different development teams. Additionally, you may encounter a situation where it may not be possible to return to the project solution and add the agent (particularly if the software was developed by a third party). 

  1. From nuget.org, download the NuGet package AppDynamics.Agent.Distrib.Micro.Windows from https://www.nuget.org/packages/AppDynamics.Agent.Distrib.Micro.Windows/.
  2. Extract (unzip) the dlls and AppDynamicsConfig.json configuration file from the Nuget package to a folder. 
  3. Update the AppDynamicsConfig.json configuration file as required.
    1. Make a copy of the of the AppDynamicsConfig.json file and rename it to <<executable_name>.AppDynamicsConfig.jsonFor example, <<servicefabricapplicationname>>.AppDynamicsConfig.json.

    2. Copy AppDynamics.Agent.dllAppDynamics.Profiler_x64.dllAppDynamicsAgentLog.configAppDynamicsConfig.json from <<nuget_package>>\content\AppDynamics and add these files in the solution of each of the service project at the top level, not under any subfolders.

    3. Make a copy of AppDynamicsConfig.json and rename it to:<<executable_name>>.AppDynamicsConfig.json, for example, <<servicefabricapplicationname>>.AppDynamicsConfig.json. Put it into the root of each service project.

      When you rename the .json file to the application name, do not include .exe at the end of your application name.

    4. Right-click the files in the AppDynamics sub-folder, and then select Copy Always.

    5. Update <<executable_name>>.AppDynamicsConfig.json with your configuration information:

      {
        "controller":
        {
          "host":"",
          "port":0,
          "account":"",
          "password":""
       },
       "application":
       {
         "name":""
       }
      }
      JS


      Do not specify node; it will be assigned automatically. Specifying tier is optional because it could be assigned automatically.

  4. Set up these environment variables for your system application:

    CORECLR_ENABLE_PROFILING=1
    CORECLR_PROFILER={39AEABC1-56A5-405F-B8E7-C3668490DB4A}
    CORECLR_PROFILER_PATH_32=<actual_path>\AppDynamics.Profiler_x86.dll
    CORECLR_PROFILER_PATH_64=<actual_path>\AppDynamics.Profiler_x64.dll

    Where <actual_path> is the complete path to the AppDynamics.Profiler dll.