Update Java config for legacy agent versions

Problem

You use Java agent version 3.16.1 or lower and need to upgrade to the latest version, but you use deprecated configuration options to configure agent attributes.

Solution

In newrelic.yml, edit the configuration properties you use for compatiblity with the latest versions:

Deprecated property New property

analytics_events

transaction_events

The stanza in the newrelic.yml configuration file called analytics_events has been deprecated. Use the transaction_events stanza instead.

capture_params

attributes.include: request.parameters.*

By default, request parameters are not sent to New Relic. Add request.parameters.* to the attributes.include list to turn on all request parameters. The capture_params property has been deprecated.

ignored_params

attributes.exclude: request.parameters.{name}

Add each request parameter key to the attributes.exclude list. Be sure to prepend the key with request.parameters. The ignored_params property has been deprecated.

capture_messaging_params

attributes.include: message.parameters.*

By default, message queue parameters are not sent to New Relic. Previously, setting capture_messaging_params to true would enable message queue parameters. Now you must add message.parameters.* to the attributes.include list.

ignored_messaging_params

attributes.exclude: message.parameters.{name}

Previously, you could set ignored_messaging_params to a list of message queue parameter keys to exclude. Now you must add each message queue parameter key to the attributes.exclude list. Be sure to prepend the key with message.parameters.

capture_attributes

attributes.enabled

The old capture_attributes flag would turn off user attribute collection. This has been deprecated. Use attributes.enabled instead.

In this example, the Java agent collects request parameters and records them to the transaction tracer and error collector destinations. This emulates enabling the legacy server-side configuration options for Capture attributes or Capture parameters.

To customize the attributes element in your Java agent configuration file:

  attributes.enabled: true
  attributes.include: request.parameters.*

For more help

Recommendations for learning more: