Collecting custom parameters

New Relic allows you to collect standard HTTP parameters, as well as custom parameters, with every transaction trace, browser trace, and error. For example, you may want to track the user name associated with a slow or failing request.

Viewing request parameters

Request parameters are associated with specific transaction traces, browser traces, and errors. You can see the parameters recorded with a request when viewing the individual trace or error.

Request Parameters
Applications > (selected app) > Monitoring > Transactions > (selected transaction) > (selected trace): Here is an example of the Request Parameters and Custom Parameters for a transaction trace.

Collecting HTTP parameters

The New Relic agent can collect the HTTP parameters sent with a request. For example, the key-value pair name : Bob would be reported for a request to http://example.com/index.php?name=Bob. These parameters will appear under Request parameters when you view a transaction trace, browser trace, or error.

Notes:

  • PHP: If you are using the PHP agent, you cannot enable parameter tracking from the New Relic user interface, but you can use your configuration file or the PHP API.
  • Other agents: If you are using an older agent that does not support configuring the application from the New Relic API user interface, see the documentation for using your agent's configuration file.

To enable HTTP parameter collections (if available):

  1. From the New Relic menu bar, select Applications > (selected app) > Settings > Application.
  2. From the Request parameters section of the Application settings, select the Capture parameters? checkbox option.
  3. Optional: To prevent certain parameters from being captured, type their values in the Filtered parameters, and separate them with commas.
  4. Select Save application settings.

Application Settings
Applications > (selected app) > Settings > Application: Use the app's settings to turn on or turn off several features, such as capturing HTTP parameters.

Collecting custom parameters

You can specify your own key-value pairs that will be associated with a slow or failing request. Anywhere in the code that handles a web transaction in your application, call an API provided by the New Relic agent. For more information, refer to the documentation for your agent:

Collecting browser parameters

The New Relic agent provides an API to specify extra details associated with a browser trace, including user, account, and product data. The values are encoded and injected into the JavaScript footer for page load timing (sometimes referred to as real user monitoring or RUM). For more information, see API options for browser traces.

For more help

Additional documentation resources include:

If you need additional help, get support at support.newrelic.com.