Download PDF
Download page Install the .NET Core Microservices Agent for Windows.
Install the .NET Core Microservices Agent for Windows
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
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.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.dllWhere
<actual_path>
is the complete path to theAppDynamics
.Profiler
dll.- Open the
AppDynamicsConfig.json
file and update the file with your AppDynamics Controller information. 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. TheAppDynamicsConfig.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 newAppDynamicsConfig.json
file can be created. - During runtime: Enter your environment variables in Azure.
- During development: As shown in the previous screenshot, you can enter your environment variables in the
- 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).
- From nuget.org, download the NuGet package AppDynamics.Agent.Distrib.Micro.Windows from https://www.nuget.org/packages/AppDynamics.Agent.Distrib.Micro.Windows/.
- Extract (unzip) the
dlls
andAppDynamicsConfig.json
configuration file from the Nuget package to a folder. - Update the
AppDynamicsConfig.json
configuration file as required.Make a copy of the of the
AppDynamicsConfig.json
file and rename it to <<executable_name>.AppDynamicsConfig.json.
For example, <<servicefabricapplicationname
>>.AppDynamicsConfig.json.
Copy
AppDynamics.Agent.dll
,AppDynamics.Profiler_x64.dll
,AppDynamicsAgentLog.config
,AppDynamicsConfig.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.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.Right-click the files in the AppDynamics sub-folder, and then select Copy Always.
Update
<<executable_name>>.AppDynamicsConfig.json
with your configuration information:{ "controller": { "host":"", "port":0, "account":"", "password":"" }, "application": { "name":"" } }
JSON
Do not specify node; it will be assigned automatically. Specifying tier is optional because it could be assigned automatically.
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.dllWhere
<actual_path>
is the complete path to theAppDynamics
.Profiler
dll
.
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
.