• EnglishEspañol日本語한국어Português
  • ログイン今すぐ開始

Transaction naming protocol

If you're using New Relic for Java with a supported framework, New Relic groups transactions based on transaction names obtained from the framework. Otherwise, New Relic groups transactions based on their component. Components are the JSPs, servlets, and filters invoked during the transaction.

重要

Do not use brackets [suffix] at the end of your transaction name. New Relic automatically strips brackets from the name. Instead, use parentheses (suffix) or other symbols if needed.

Grouping transactions

The New Relic Java agent groups similar transactions together under a single name. If New Relic did not group transactions, each unique URI would generate a unique name. For example, your web application might produce URIs like:

/user/123/control_panel.jhtml
/user/456/control_panel.jhtml
/user/789/control_panel.jhtml

Without grouping, this would produce three (fairly meaningless) individual metrics. Therefore, New Relic attempts to group transactions together under a meaningful label. For more information about metric grouping, see Metric grouping issues.

Transaction names use URI format. For example:

MyTransactionName
/MyTransactionName
/MyServlet/MyTransactionName

If you are using a supported framework, New Relic obtains the transaction name from the framework. For example, for Spring the transaction name typically comes from calling getViewName on the org.springframework.web.servlet.ModelAndView object.

If you are not using a supported framework, New Relic names a transaction based on its components. The exact transaction name is determined by the component with the highest priority. If multiple component share priority, the agent uses the first component that was invoked.

Naming priority

New Relic assigns each transaction a name according to the following priority, from highest priority to lowest:

Disable component-based naming

For some applications, you may want to disable component-based transaction naming. Set this value in your newrelic.yml file:

enable_auto_transaction_naming: false

注意

Unless you implement API calls to name your transactions, disabling auto-transaction naming is very likely to cause Metric grouping issues.

Copyright © 2024 New Relic株式会社。

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.