Help APM APM Insight using .NET Agent Customize transaction name

Customize transaction names via .NET Core agent API

You can set custom names for your transactions using the .NET Core agent API. This helps you to easily monitor business critical transactions. 

To do so, follow the below given instructions. 


  1. Download the package Site24x7.DotNetCoreAgent.Api from the NuGet package manager.
  2. Add a reference to the library Site24x7.Agent.Api.dll to your .NET Core web application project.
  3. The API contains a class named Api to track the performance of a method.
  4. Use the method SetTransactionName(string) to set a custom name for a transaction.


The following method illustrates how to set a transaction name via the API.

public int UserLogin(string email, string sessionKey, bool isExternal)
AccountBL objAdmin = new AccountBL(); 
string EmpName = string.Empty;
int retcode = objAdmin.LogIn(email, out int EmpId, out EmpName);
if (retcode == 0)
Session["EmpName"] = EmpName;
Session["EmpId"] = EmpId;
Session["isAuthenticated"] = true;


  • If you call multiple times in a single transaction, the name used in the first call will be used as the transaction name.
  • Unique values like session ID, page titles, or GUID should not be used in naming transactions.
  • Avoid creating more than 350 unique transaction names, since we have restricted the transaction storage limit to 350 per application.


Before renaming:

After renaming:

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

Help APM APM Insight using .NET Agent Customize transaction name