Configure Application Filters for .NET Core applications
You can exclude selected .NET Core applications from being monitored by Site24x7 APM Insight. This will help in the exclusion of unwanted applications and result in the most efficient use of your license.
Follow the steps below to monitor selected .NET Core applications with Site24x7 APM Insight.
- Filter .NET Core applications hosted on IIS.
- Filter .NET Core applications running as standalone processes or as Windows services.
1. Steps to filter .NET Core applications hosted on IIS
- Navigate to the folder where the .NET Core agent is installed.
- Open the appfilter.config file in the text editor.
- Add or modify the app pool name and its corresponding monitor name as shown below.
<?xml version="1.0" encoding="utf-8" ?>
<applications>
<application AppPoolName="Your_Application_Pool_Name"
MonitorName="Your_APM_Application_Name" />
</applications>
Unlike in the .NET agent, applications in the .NET Core agent are monitored or excluded based on their application pool name. This is why you must enter the name of the corresponding application pool. You can also use the same name or a new name to monitor the IIS applications in Site24x7. - Save the appfilter.config file.
- Recycle the application pool or use the IISRESET command to restart it.
- Perform transactions in the application to view data in the Site24x7 console.
2. Steps to filter .NET Core applications running as standalone processes or as Windows services
- Navigate to the folder where the .NET Core agent is installed.
- Open the netcore_appfilter.config file in the text editor.
- Add or modify the process name and its corresponding monitor name as shown below.
<?xml version="1.0" encoding="utf-8" ?>
<processes>
<process Name="Your_ApplicationProcess_Or_WindowsServiceProcess_Name.exe"
MonitorName="Your_APM_Application_Name" />
</processes>
You can set the same name or a new name to monitor the application in Site24x7. - Save the netcore_appfilter.config file.
- Restart the standalone .NET Core application or the .NET Core Windows service to create the monitor.
- Add the application methods to the custom instrumentation to collect performance metrics, as shown in the following steps.
- Log in to Site24x7.
- Navigate to APM Insight and select your .NET Core application monitor.
- Hover over the hamburger menu icon (≡) and select Edit, which directs you to the Edit APM Insight Application page.
- In the Custom instrumentation field, add the class method that is called periodically in the Windows service or the method that is triggered most of the time in a standalone application.
Syntax:
Example:
- Save the configuration and wait for a couple of minutes.
- Now restart the .NET Core application to start monitoring.