For almost every web-based framework or platform, there is a URI based business transaction entry point for user requests. AppDynamics App Agents automatically discover the following URI-based entry points:

  • Java Agent: Servlet entry points
  • .NET Agent: ASP.NET entry points
  • Node.js Agent: Node.js web entry points
  • Python Agent: Python web entry points

The Web server Agent can detect Web request entry points, but automatic discovery is turned off by default so an agent on a downstream node can name the transaction.

URI based entry points all have similar configuration options for Automatic Transaction Discovery and Custom Match rules.

For additional functionality that applies to servlets, see Servlet Entry Points.

Default Naming

By default, when an app agent detects a URI request, it names the business transactions using the first two segments of the URI. For example, consider the following URI for a checkout operation in an online store: http://acmeonline.com/store/checkout.

The agent names the business transaction "/store/checkout" and assigns all requests that match that URI to the "store/checkout" business transaction.

If the first two segments of the URI do not contain enough information to effectively identify the business transaction in your environment, you can edit the automatic discovery rule to name the transaction based upon the URI and its context. Alternatively, you can create a custom match rule to specify a name.

For ASP.NET Core on the full framework, the default naming convention uses the Controller, action, and area. See Name MVC Transactions by Area, Controller, and Action for more information and configuration options.

Customize Automatic Naming Rules

When you edit or create a new Default Automatic Discovery Rule for URI based entry points, you can adjust naming to:

  • Use the full URI to name transactions.
  • Use part of the URI to dynamically name transactions.

Expand the Configure Naming option on the Rule Configuration tab to display the configuration options.

When you configure the rule to Use the full URI, the agent creates a business transaction name for the full request URI. There are no dynamic naming options. For example, for the URI http://acmeonline.com/store/coats/men, the agent names the transaction "/store/coats/men".

Use the full URI works well for Grails servlet transactions because the default naming scheme often doesn't differentiate between multiple transactions.


When you use parts of the URI to name transactions, you have several options to configure transaction naming:

 

Use a Part of the URI

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

  • Use the first or last URI segments 

  • Use specific URI segments

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

http://example.com/Web/Store/Checkout yields a default transaction name of "Web/Store".

You can use one of the following options to identify more meaningful transaction names:

  • Click Use the first or Use the last n segments to use two contiguous segments at the beginning or end of the URI, where n is the number of segments. For example, if identify the checkout transaction using the last two segments of the URI, the agent names the transaction "/Store/Checkout".
  • If you need more flexibility, such as using non-contiguous segments in the name, click Name Transactions dynamically using part of the request. Select Use URI segments in Transaction names option. To specify multiple segments, enter a comma-separated list of segment numbers.

    For example, the following URL represents the checkout transaction requested by a customer with ID 1234: http://example.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: "StoreCheckout".
    Configure Naming

Use Headers, Cookies, and Other Parts of HTTP Requests

When you use the Name Transactions dynamically using part of the request option, you can choose to identify your URI based transactions using particular parts of the HTTP request. Note that not all agents offer all the naming options below.

  • To use HTTP parameter values in transaction names, select Use a parameter value in Transaction names and enter the Parameter Name.
    For example, consider the following URL: http://example.com/Store/Inventory?category=electronics
    Parameter Name
    AppDynamics names the transaction to include the category parameter value "/Store/Inventory.electronics".
  • To use a header value in transaction names, select 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 "/Store/Inventory.v2.5".
  • To use a cookie value in transaction names, select 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, 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, click Use the request method (GET/POST/PUT) in Transaction names.
    For example AppDynamics names the transaction "/Store/Inventory.GET".
  • To use the request host in Transaction names, click Use the request host in Transaction names.
    For example AppDynamics includes the request host id in the transaction name "/Store/Inventory.192.0.2.0".
  • To use the request originating address in Transaction names, click Use the request originating address in Transaction names.
    AppDynamics names transactions for the IP address of the request client "/Store/Inventory.192.0.2.10".

Use a Custom Expression

You can use a custom expression on the URI to name:

  • Java servlet transactions
  • .NET ASP.NET transactions

Select Name Transactions dynamically using part of the request and choose Use a custom expression in Transaction names. Enter your custom expression getter chain as follows:

For Java, you can use getter chains to access values from the HTTPServletRequest object. For example, suppose you want to use a combination of the authenticated user and the value of an HttpServletRequest:

${getParameter(myParam)}-${getUserPrincipal().getName()}

The equivalent code expression would evaluate to:

request.getParameter("myParam")+"-"+request.getUserPrincipal()

You can create a custom expression on the HTTPServletRequest to identify all Servlet based requests (modify global discovery at the transaction naming level) or for a specific set of requests (custom rule).

A custom expression for a servlet transaction can have a combination of any of the following getter methods on request attributes:

Getters on Request Attributes

Transaction Identification

getAuthType()

Use this option to monitor secure (or insecure) communications.

getContextPath()

Identify the user requests based on the portion of the URI.

getHeader()

Identify the requests based on request headers.

getMethod()

Identify user requests invoked by a particular method.

getPathInfo()

Identify user requests based on the extra path information associated with the URL (sent by the client when the request was made).

getQueryString()

Identify the requests based on the query string contained in the request URL after the path.

getRemoteUser()

Identify the user requests based on the login of the user making this request.

getRequestedSessionId()

Identify user requests based on the session id specified by the client.

getUserPrincipal()

Identify user requests based on the current authenticated user.


For .NET, you can use
 getter chains to access properties and methods for the HttpRequest object for ASP.NET or Microsoft.AspNetCore.Http.Internal.DefaultHttpRequest for ASP.NET Core on the full framework.

  • Enclose getter chains inside braces: ${} . The custom expression may contain multiple getter chains.
  • Use getter chain syntax.
  • Use any HttpRequest request attributes or methods.

 For example, consider the URL http://mystore.example.com/Store/Inventory-Furniture .The following custom expression uses two getter chains to access properties of the HTTPRequest object:

 ${Url.ToString().Split(Char[]/-).[2]}-${UserAgent}
  • 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. 

 The result is the following business transaction name:

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