AppDynamics automatically detects entry points for client requests to ASP.NET applications. If the request occurs on an originating tier, the method or operation marks the beginning of a business transaction and defines the transaction name. In most cases, this type of entry point maps to a user request or action such as "Cart/Checkout". AppDynamics allows you to configure transaction naming based upon the ASP.NET request.

Default Automatic Naming for ASP.NET Transactions

By default, the AppDynamics auto-detection naming scheme identifies all ASP.NET transactions using the first two segments of the URI. 

For example, the following URI represents the checkout operation in an online store:

http://mydotnetsite.com/Cart/Checkout

AppDynamics automatically names the transaction:

/Cart/Checkout

For another example, the following URI represents a funds transfer operation in an online bank:

http://webbank.mybank.com/Account/Transferfunds/NorthernCalifornia

AppDynamics automatically names the transaction:

/Account/Transferfunds

Customize the Automatic Naming Scheme

The AppDynamics auto-detected transaction names might not be optimal for your users. You can configure the naming scheme as follows:

To modify automatic naming

  1. Click Configure > Instrumentation > Transaction Detection.

  2. Click the .NET - Transaction Detection tab.

  3. From the Select Application or Tier list at the left, click either:
  4. If necessary, click Enabled under Transaction Monitoring and Discover Transactions automatically for ASP.NET requests.
    (info) You can configure naming with Discover Transactions automatically for ASP.NET requests disabled, but the agent doesn't discover ASP.NET transactions.

  5. Click Configure Naming for the ASP.NET type in the in the Entry Points panel.

  6. Change the naming scheme in the ASP.NET Transaction Naming Configuration window and click Save.

The following sections provide examples to help you decide how to configure the naming scheme.

Identify Transactions Using URI Segments

AppDynamics offers the following options to automatically name ASP.NET transactions based upon the URI:

To name transactions using all, first, or last URI segments 

 Consider the following URL that represents the checkout operation in an online store:

http://mydotnetsite.com/Web/Store/Checkout

The first two segments of the URI don't provide a significant name for the business transaction:

/Web/Store

Identify a more meaningful name using one of the following options:

   For example, to identify the checkout transaction using the last two segments of the URI:

  /Store/Checkout

To use specific URI segments in transaction names 

You can choose specific URI segments to use in the transaction name. This enables you to skip URI segments or use non-contiguous segments in the naming scheme.

  1. Click Use a part of the URI.

  2. Enter the number of first or last segments to use.

  3. Click Name Transactions dynamically using part of the request.

  4. Click Use URI segment(s) in Transaction names.

  5. Enter the segment numbers separated by commas.

    For example the following URL represents the checkout transaction requested by a customer with ID 1234:

    http://mydotnetsite.com/Store/cust1234/Checkout

    The checkout transaction is the same regardless of the customer, so it makes sense to name the transaction based upon the first and third segments of the URI.

AppDynamics names the transaction:

/Store/Checkout

Identify Transactions Using Headers, Cookies, and Other Parts of HTTP Requests

You can also name ASP.NET transactions using parameters, headers, cookies, and other parts of HTTP requests.

To identify all your ASP.NET transactions using particular parts of the HTTP request, use the Name Transactions dynamically using part of the request option.

(info) Carefully consider your naming configuration choices. If you use a value such as the request originating address and you have many clients accessing your application, you may see the All Other Traffic Business Transaction.

To use HTTP parameter values in transaction names

  1. Set the URI identification option.

  2. Click Use a parameter value in Transaction names and enter the Parameter Name

For example, consider the following URL:

http://mydotnetsite.com/Store/Inventory?category=electronics

AppDynamics names the transaction to include the category parameter value:

/Store/Inventory.electronics

To use a header value in transaction names

  1. Set the URI identification option.

  2. Click Use header value in transaction names and enter a Header Name.
    For example, consider a site that uses the custom header "Version", AppDynamics names transactions with the header value as follows:

    /Store/Inventory.v2.5

To use a cookie value in transaction names

  1. Set the URI identification option.

  2. Click Use a cookie value in Transaction names and enter the Cookie Name.
    For example, a website tracks a user's loyalty status in a cookie. Set the Cookie Name to "loyalty". AppDynamics names transactions for the loyalty cookie value:

    /Store/Inventory.Status=Gold

To use a session attribute value in transaction names

  1. Set the URI identification option.

  2. Click Use a session attribute in Transaction names and enter the Session Attribute Key.
    For example, a website stores a customer's region in the session property. Set the Session Attribute name to "region". AppDynamics names transactions for the region session attribute value:

     /Store/Inventory.NorthAmerica

To use the request method in Transaction names

  1. Set the URI identification option.

  2. Click Use the request method (GET/POST/PUT) in Transaction names.
    AppDynamics names transactions for the request method. For example:

    /Store/Inventory.GET

To use the request host in Transaction names

  1. Set the URI identification option.

  2. Click Use the request host in Transaction names.
    AppDynamics names transactions for the ip address of the request host. For example:

    /Store/Inventory.192.0.2.0

To use the request originating address in Transaction names

  1. Set the URI identification option.

  2. Click Use the request originating address in Transaction names.
    AppDynamics names transactions for the ip address of the request client. For example:

    /Store/Inventory.192.0.2.10

 

To use a custom expression on the HttpRequest

New in 3.8.x, custom expressions enable you to name transactions using getter chain(s) for HttpRequest properties and methods.

  1. Set the URI identification option.
  2. Click Apply a custom expression on HttpRequest and use the result in Transaction Names.
  3. Enter your custom expression getter chain as follows:
    • Enclose getter chain(s) inside braces: ${} .
    • Use getter chain syntax.
    • Use any HttpRequest request attributes or methods.

    For example, consider this URL:

    http://mystore.example.com/Store/Inventory-Furniture 

    The following custom expression uses two getter chains:

    • The first getter chain fetches the URL, splits it on the dash character ("-"), and uses the second string in the array.
    • The second getter chain fetches the HttpRequest.UserAgent property.
    • The literal dash character "-" separates the two getter chains. 

     ${Url.ToString().Split(Char[]/-).[2]}-${UserAgent}

    The result is the following business transaction name:

    Furniture-Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko

Custom Match Rules for ASP.NET Transactions

Custom match rules provide greater flexibility for transaction naming. When you define a match rule, AppDynamics uses the rule name for the business transaction name.

For steps to access the Custom Match Rules pane, see To create custom match rules for. NET entry points.

To create an ASP.NET custom match rule

  1. In the Custom Match Rules pane, click the plus symbol (+) to add an entry point.

  2. Click ASP.NET in the dropdown list. Click Next.

  3.  Name the New Business Transaction Match Rule.
  4. Set one or more of the following match criteria. When AppDynamics detects a requests matching your specified criteria, it identifies the request using your custom name.

    Method: Match on the HTTP request method, GET, POST, PUT or DELETE.

    WIth automatic discovery for ASP.NET transactions enabled, configuring the match on GET or POST causes the the agent to discover both GET and POST requests. If you only want either GET or POST requests for the transaction, consider the following options:

    • Disable automatic discovery for ASP.NET transactions.
    • Create an exclude rule for the method you don’t want: GET or POST.



    URI: Set the conditions to match for the URI.


    HTTP Parameter: Match on HTTP parameter existence or a specific HTTP parameter value.

    Header
    : Match on a specific HTTP header's (parameter's) existence or a specific HTTP header value.

    Hostname
    : Match on the server host name. Optionally click the gear icon to set a NOT condition.

    Port: Match on the server port number. Optionally click the gear icon to set a NOT condition.

    Class Name: Match on the ASP.NET class name. Optionally click the gear icon to set a NOT condition.

    Cookie: Match on cookie existence or a specific a specific cookie value.

  5. Click Save.

    The rule appears in the Custom Match Rule list. The business application or tier you customized displays a green check in the Select Application or Tier pane.
    After the agent receives the updated configuration, it discovers the new business transaction and displays it in the Business Transactions List.

To split custom ASP.NET transactions

AppDynamics lets you further refine ASP.NET custom transaction names using transaction splitting. See Transaction Splitting for Dynamic Discovery.

  1. Create a custom match rule. To use transaction splitting, you must specify URI match criteria.

  2. Click Split Transactions Using Request Data.

  3. Click the splitting option to use.

    The transaction splitting options work the same as the methods described in the previous sections:
    Identify transactions using URI segments
    Identify Transactions Using Headers, Cookies, and Other Parts of HTTP Requests

    For example, consider the following URL:
    http://mydotnetsite.com/Store/Inventory?category=electronics

    Configure the custom match rule to match on the "URI contains Inventory".


    Split the transaction on the category parameter.
  4. Click Save.
    After the agent receives the updated configuration, it discovers the new business transaction and displays it in the Business Transactions List.

Learn More

Configure Business Transaction Detection for .NET

Web Entry Points

Configure Business Transaction Detection