Configure transaction traces

In New Relic APM, transaction traces record in-depth details about your application's transactions and database calls. If transaction traces are included as part of your subscription level, they are enabled by default in New Relic APM. This documentation explains how to edit the transaction trace default settings.

Access to this feature depends on your subscription level.

For a basic explanation of transaction traces, see Transaction traces.

Configure transaction trace settings via agent

You can customize your transaction trace settings via New Relic agent configuration files. For all agents except Node and PHP, you can also change these settings via the UI.

Select a New Relic language agent to see its transaction trace configuration options:

Configure transaction traces via UI

The New Relic Node.js and PHP agents don't allow configuration via the UI. If you are using these agents, the transaction trace settings will be visible in the UI but not editable. For information on using the New Relic agent to change these settings, see Agent trace configuration.

To access the transaction trace settings in the New Relic APM UI:

  1. From, select APM > (selected app) > Settings > Application.
  2. On the right side of the page, select Show advanced settings to expose all setting options.

Here are explanations of the transaction trace settings found in the UI. The available settings and their exact descriptions will differ depending on the New Relic agent you use.

Enable transaction tracing?

Select the checkbox to turn transaction traces on and off. The box must be checked for transaction traces to be generated. If your subscription level includes transaction traces, they will be enabled by default.


When a transaction exceeds the threshold, it will be a candidate for a transaction trace. The default threshold value is apdex_f, which equals your Apdex T value multiplied by 4.

Alternatively, you can set the threshold value to a specific number of seconds. If a number-of-seconds threshold is set, this acts as the threshold for all transactions, even for key transactions with their own custom Apdex value.

Record SQL?

This setting controls the collection of SQL and SQL-like query data. The New Relic agents differ in the types of query commands they recognize and collect.

There are three possible settings:

  • Obfuscated: This is the highest security setting and the default setting. Replaces numeric and string literals in queries with question marks.
  • Off: Turns database query collection off.
  • Raw: Records all possible database queries, with nothing obfuscated. This is a potential security issue if you have sensitive data exposed in queries.
Stack trace threshold

This is the minimum threshold for the agent to generate a stack trace, in seconds. For some New Relic agents, this threshold applies to any segment in a transaction. For other agents, the threshold applies only to database queries.

Stack traces are relatively resource-expensive operations. Be aware that setting this threshold too low could affect application performance.

Enable SQL query plans?

When enabled, the agent requests the SQL plans (also known as the explain plans) from the database. Explain plans contain the protocol behind database execution of slow queries.

Query plan threshold

When a query response time exceeds this value in seconds, the agent will request a database query plan from your database. This is only active when SQL query plans (above) are enabled.

Capture memcache keys?

Enable or disable the capture of memcache keys. (Not available for Python.)

These values cannot be "sanitized" (obfuscated). Do not enable this feature if your keys contain sensitive data.

Enable error collection?

Enable or disable error collection. There is also an option, under this checkbox, to ignore certain types of errors.

Enable slow query tracing?

Enable or disable the collection of slow query data.

Enable thread profiler?

Enable or disable thread profiling.

Enable cross-application tracing?

Enable or disable cross-application tracing.

Configure traces for key transactions

You can make a transaction a key transaction if you want to monitor or alert on it differently than other transactions. For more on key transactions and how to use them, see Key transactions.

One benefit of making a transaction a key transaction is that you can set a transaction-specific Apdex that is different from your general Apdex T threshold. Changing a key transaction's Apdex changes the likelihood that it creates a transaction trace.

For example, if you wanted to make it more likely a key transaction would generate transaction traces, you would lower its Apdex T value. If you wanted to make a key transaction less likely to be traced, you'd raise its Apdex T value.

If you have the transaction trace threshold set to a number of seconds, and not to the default Apdex setting, the number-of-seconds threshold will act as the threshold for all transactions, even for key transactions that have custom Apdex settings.

Create custom transactions

You can create custom transactions for app activity that isn't being automatically captured as a transaction by the New Relic agent. See Custom instrumentation for more information.

Collect HTTP request attributes, parameters

For data security reasons, transaction traces do not collect potentially sensitive HTTP request attributes, sometimes called parameters. Traces do collect some basic HTTP request attributes, which New Relic calls agent attributes. See the New Relic agent documentation for how to edit attribute collection settings:

For information on how to capture custom attributes, see Collect custom attributes.

Delete a transaction trace

Here are instructions for deleting transaction traces. When you delete a transaction trace, it is deleted permanently.

Delete a single transaction trace

To delete a transaction trace record permanently:

  1. In New Relic APM, select a transaction trace.
  2. Select Delete this trace, which is located under the Transaction trace title.
Delete all transaction traces

To delete all traces for the selected app permanently:

  1. In New Relic APM, go to the Transactions page.
  2. At the bottom of the list of transactions, select Delete all traces.

It may take fifteen minutes or more for all transaction trace records to disappear from the UI.

To delete all traces for your account, get support at

If you are doing general record cleanup, you may also want to delete databases and slow query traces or error traces. This will remove potentially sensitive data while retaining your other application data (such as Apdex, deployment information, etc.).

For more help

Join the discussion about New Relic APM in the New Relic Online Technical Community! The Technical Community is a public platform to discuss and troubleshoot your New Relic toolset.

If you need additional help, get support at