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 theConfigure Namingoption on theRule Configurationtab to display the configuration options.

When you configure the rule to /store/coats/menUse 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

Tip: 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

Splunk 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:

  • ClickUse the firstorUse the last nsegments 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, clickName Transactions dynamically using part of the request. SelectUse URI segments in Transaction namesoption. 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. Splunk AppDynamics names the transaction: "StoreCheckout".URI in Transaction Name

Use Headers, Cookies, and Other Parts of HTTP Requests

When you use theName Transactions dynamically using part of the requestoption, 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.

Note: 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, selectUse a parameter value in Transaction namesand enter theParameter Name.For example, consider the following URL: http://example.com/Store/Inventory?category=electronics URI in Transaction NameSplunk AppDynamics names the transaction to include the category parameter value "/Store/Inventory.electronics".
  • To use a header value in transaction names, selectUse header value in Transaction namesand enter aHeader Name.For example, consider a site that uses the custom header "Version", Splunk AppDynamics names transactions with the header value "/Store/Inventory.v2.5".
  • To use a cookie value in transaction names, selectUse a cookie value in Transaction namesand enter theCookie Name.For example, a website tracks a user's loyalty status in a cookie. Set the Cookie Name to "loyalty". Splunk AppDynamics names transactions for the loyalty cookie value "/Store/Inventory.Status=Gold"
  • To Use a session attribute value in transaction names, ClickUse a session attribute in Transaction namesand enter theSession Attribute Key.For example, a website stores a customer's region in the session property. Set the Session Attribute name to "region". Splunk AppDynamics names transactions for the region session attribute value "/Store/Inventory.NorthAmerica".
  • To use the request method in Transaction names, clickUse the request method (GET/POST/PUT) in Transaction names.For example, Splunk AppDynamics names the transaction "/Store/Inventory.GET".
  • To use the request host in Transaction names, clickUse the request host in Transaction names.For example, Splunk 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, clickUse the request originating address in Transaction names.Splunk 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

SelectName Transactions dynamically using part of the requestand chooseUsea 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 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

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

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

${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