Install the .NET Core Microservices Agent

Before you install the .NET Core microservices agent, ensure that you have access to the 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.WindowsWhen you install the NuGet package, the AppDynamicsConfig.json
  2. Set up these environment variables for your system application:Where <actual_path> AppDynamics Profiler
    CORECLR_ENABLE_PROFILING=1CORECLR_PROFILER={39AEABC1-56A5-405F-B8E7-C3668490DB4A}CORECLR_PROFILER_PATH_32=<actual_path>\AppDynamics.Profiler_x86.dllCORECLR_PROFILER_PATH_64=<actual_path>\AppDynamics.Profiler_x64.dll
  3. In the Solution Explorer, update <your app>/AppDynamicsConfig.json
    {
    "controller": {
    "host": "PUT_YOUR_VALUE_HERE",
    "port": 0,
    "account": "PUT_YOUR_VALUE_HERE",
    "password": "PUT_YOUR_VALUE_HERE",
    "ssl": false,
    "enable_tls2": false
    },
    "application": {
    "name": "PUT_YOUR_VALUE_HERE",
    "tier": "PUT_YOUR_VALUE_HERE",
    "node": "PUT_YOUR_VALUE_HERE"
    }
    }
  4. Use these options to configure the .NET Agent to connect to the 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 variablesthat 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 (particchoicesarly 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 servicefabricapplicationname AppDynamicsConfig.json.<<executable name>>
    2. Copy AppDynamics.Agent.dll AppDynamics.Profiler_x64.dll AppDynamicsAgentLog.config AppDynamicsConfig.json nuget_package \content\AppDynamics
    3. Make a copy of AppDynamicsConfig.json <<executable_name>>.AppDynamicsConfig.json <<servicefabricapplicationname. Put it into the root of each service project.
      Note: 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 Cisco AppDynamicssub-folder, and then select Copy Always.
    5. Update <<executable_name>>.AppDynamicsConfig.json. Do not specify node; it will be assigned automatically. Specifying tier
      {
      "controller":
      {
      "host":"",
      "port":0,
      "account":"",
      "password":""
      },
      "application":
      {
      "name":""
      }
      }
      Specifying Tier is optional because it could be assigned automatically.
  4. Set up these environment variables for your system application:Where <actual_path> AppDynamics Profiler dll
    CORECLR_ENABLE_PROFILING=1CORECLR_PROFILER={39AEABC1-56A5-405F-B8E7-C3668490DB4A}CORECLR_PROFILER_PATH_32=<actual_path>\AppDynamics.Profiler_x86.dllCORECLR_PROFILER_PATH_64=<actual_path>\AppDynamics.Profiler_x64.dll
    Note: If you use an in-process hosting for IIS, add the property, <AppDynamicsUseCatchAllConfig>True</AppDynamicsUseCatchAllConfig> in the csproject. Then, the config will be named AppDynamicsConfig.json.