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 :
- Add the Site24x7.DotNetCoreAgent to your project.
- 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
- Copy license key from the Site24x7 portal as given in the screenshot below
- Create an environment variable and paste the license key as mentioned below,
- Publish and deploy your web application.
- The application name will be created by default with the ASP.NET Core application name.
- 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,
application.name=<YOUR_APPLICATION_NAME> - Perform the transactions to collect performance metrics.
- The following image explains the installation procedure
To uninstall .NET Core Agent:
- Open .NET Core application project in Visual Studio IDE.
- Go to startup.cs file and remove the below line of code,
- Right click on project and select Manage NuGet Packages...
- Select Site24x7.DotNetCoreAgent from the installed packages list.
- Click Uninstall to remove the APM Insight .NET Core agent.
- Publish and deploy the application.