Enabling and disabling attributes (Ruby)

This describes the properties to enable or disable attributes, and the rules that New Relic uses when determining which attributes to include or exclude for a destination. This also includes a summary of the Ruby agent properties that have been deprecated with the release of New Relic agent attributes.

Contents

Properties

Use the following properties to enable or disable attributes:

attributes.enabled

Type

Boolean

Default

true

Environ variable

NEW_RELIC_ATTRIBUTES_ENABLED

If true, enables capture of attributes for all destinations.

transaction_tracer.attributes.enabled

Type

Boolean

Default

(Dynamic)

Environ variable

NEW_RELIC_TRANSACTION_TRACER_ATTRIBUTES_ENABLED

If true, the agent captures attributes from transaction traces.

transaction_events.attributes.enabled

Type

Boolean

Default

(Dynamic)

Environ variable

NEW_RELIC_TRANSACTION_EVENTS_ATTRIBUTES_ENABLED

If true, the agent captures attributes from transaction events.

error_collector.attributes.enabled

Type

Boolean

Default

(Dynamic)

Environ variable

NEW_RELIC_ERROR_COLLECTOR_ATTRIBUTES_ENABLED

If true, the agent captures attributes from error collection.

browser_monitoring.attributes.enabled

Type

Boolean

Default

(Dynamic)

Environ variable

NEW_RELIC_BROWSER_MONITORING_ATTRIBUTES_ENABLED

If true, the agent captures attributes from browser monitoring.

span_events.attributes.enabled

Type

Boolean

Default

(Dynamic)

Environ variable

NEW_RELIC_SPAN_EVENTS_ATTRIBUTES_ENABLED

If true, the agent captures attributes on span events.

transaction_segments.attributes.enabled

Type

Boolean

Default

(Dynamic)

Environ variable

NEW_RELIC_TRANSACTION_SEGMENTS_ATTRIBUTES_ENABLED

If true, the agent captures attributes on transaction segments.

attributes.exclude

Type

Array

Default

[]

Environ variable

NEW_RELIC_ATTRIBUTES_EXCLUDE

Prefix of attributes to exclude from all destinations. Allows * as wildcard at end.

transaction_tracer.attributes.exclude

Type

Array

Default

[]

Environ variable

NEW_RELIC_TRANSACTION_TRACER_ATTRIBUTES_EXCLUDE

Prefix of attributes to exclude from transaction traces. Allows * as wildcard at end.

transaction_events.attributes.exclude

Type

Array

Default

[]

Environ variable

NEW_RELIC_TRANSACTION_EVENTS_ATTRIBUTES_EXCLUDE

Prefix of attributes to exclude from transaction events. Allows * as wildcard at end.

error_collector.attributes.exclude

Type

Array

Default

[]

Environ variable

NEW_RELIC_ERROR_COLLECTOR_ATTRIBUTES_EXCLUDE

Prefix of attributes to exclude from error collection. Allows * as wildcard at end.

browser_monitoring.attributes.exclude

Type

Array

Default

[]

Environ variable

NEW_RELIC_BROWSER_MONITORING_ATTRIBUTES_EXCLUDE

Prefix of attributes to exclude from browser monitoring. Allows * as wildcard at end.

span_events.attributes.exclude

Type

Array

Default

[]

Environ variable

NEW_RELIC_SPAN_EVENTS_ATTRIBUTES_EXCLUDE

Prefix of attributes to exclude from span events. Allows * as wildcard at end.

transaction_segments.attributes.exclude

Type

Array

Default

[]

Environ variable

NEW_RELIC_TRANSACTION_SEGMENTS_ATTRIBUTES_EXCLUDE

Prefix of attributes to exclude from transaction segments. Allows * as wildcard at end.

attributes.include

Type

Array

Default

[]

Environ variable

NEW_RELIC_ATTRIBUTES_INCLUDE

Prefix of attributes to include in all destinations. Allows * as wildcard at end.

transaction_tracer.attributes.include

Type

Array

Default

[]

Environ variable

NEW_RELIC_TRANSACTION_TRACER_ATTRIBUTES_INCLUDE

Prefix of attributes to include in transaction traces. Allows * as wildcard at end.

transaction_events.attributes.include

Type

Array

Default

[]

Environ variable

NEW_RELIC_TRANSACTION_EVENTS_ATTRIBUTES_INCLUDE

Prefix of attributes to include in transaction events. Allows * as wildcard at end.

error_collector.attributes.include

Type

Array

Default

[]

Environ variable

NEW_RELIC_ERROR_COLLECTOR_ATTRIBUTES_INCLUDE

Prefix of attributes to include in error collection. Allows * as wildcard at end.

browser_monitoring.attributes.include

Type

Array

Default

[]

Environ variable

NEW_RELIC_BROWSER_MONITORING_ATTRIBUTES_INCLUDE

Prefix of attributes to include in browser monitoring. Allows * as wildcard at end.

span_events.attributes.include

Type

Array

Default

[]

Environ variable

NEW_RELIC_SPAN_EVENTS_ATTRIBUTES_INCLUDE

Prefix of attributes to include in span events. Allows * as wildcard at end.

transaction_segments.attributes.include

Type

Array

Default

[]

Environ variable

NEW_RELIC_TRANSACTION_SEGMENTS_ATTRIBUTES_INCLUDE

Prefix of attributes to include in transaction segments. Allows * as wildcard at end.

Attribute rules

New Relic follows these rules when determining which attributes to include or exclude for a destination.

Root level takes precedence for enabled.

The attributes.enabled field trumps all other settings. When false, no attributes will be reported to New Relic.

New Relic recommends having these URIs reported, as they can contain useful debugging information. If your URIs contain sensitive data that you don't want reported, URI reporting can be disabled. For example, sensitive data could include email addresses or account IDs. To disable URI reporting, add any of the above attribute names to the attributes.exclude list.

For example, if you adding the following key to your configuration file will stop the agent from reporting any of the URI-related properties:

attributes.exclude: uri

Deprecated properties

The following properties have been deprecated. Switch to the new attributes configuration for these properties when upgrading your Ruby agent.

Deprecated property

New property

capture_params

attributes.include: request.parameters.*

resque.capture_params

attributes.include: job.resque.args.*

sidekiq.capture_params

attributes.include: job.sidekiq.args.*

transaction_tracer.capture_attributes

transaction_tracer.attributes.enabled

error_collector.capture_attributes

error_collector.attributes.enabled

browser_monitoring.capture_attributes

browser_monitoring.attributes.enabled

analytics_events.capture_attributes

transaction_events.attributes.enabled

For more help

Additional documentation resources include:

Agent attributes (types, destinations, and limits for attributes used by New Relic agents)