Monitor the performance of .NET Core applications.

Monitor your web applications built in .NET Core 2.1 and above with the help of APM Insight .NET Core Agent. APM Insight .NET Core agent helps to track HTTP Requests, SQL Queries, Web API calls and Remote calls in your ASP .NET Core applications . Application exceptions can be logged with the help of logger API provided.

This method of installation works both in Linux and Windows environment. Obtain the APM Insight .NET Core agent from Nuget by following the below given instructions - the steps are the same for both the environments.  

To install .NET Core agent :

  1. Add the Site24x7.DotNetCoreAgent to your project.
PM> Install-Package Site24x7.DotNetCoreAgent 
  1. Modify the ConfigureServices method in your Startup.cs file. Insert the following one line of code before the AddMvc() method as given in the screenshot
  1.  Copy license key from the Site24x7 portal as given in the screenshot below
  2. Create an environment variable and paste the license key as mentioned below,
  1. Publish and deploy your web application. 
  2. The application name will be created by default with the ASP.NET Core application name.
  3. If you want to change it
    • Navigate to <ApplicationPublishDirectory>\DotNetAgent\apminsight.conf
    • If it is not available create the file in the above mentioned location.
    •  Add an entry in the file as,<YOUR_APPLICATION_NAME>
  4. Perform the transactions to collect performance metrics.
  5. The following image explains the installation procedure


To uninstall .NET  Core Agent:

  1. Open .NET Core application project in Visual Studio IDE.
  2. Go to startup.cs file and remove the below line of code,
  1. Right click on project and select Manage NuGet Packages...
  2. Select Site24x7.DotNetCoreAgent from the installed packages list.
  3. Click Uninstall to remove the APM Insight .NET Core agent.
  4. Publish and deploy the application.


Was this document helpful?
Thanks for taking the time to share your feedback. We’ll use your feedback to improve our online help resources.