---
title: Ruby agent attributes
source: https://docs.newrelic.com/docs/apm/agents/ruby-agent/attributes/ruby-agent-attributes
---

[Attributes](https://docs.newrelic.com/docs/features/agent-attributes) are key-value pairs containing information that determines the properties of an event or transaction. These key-value pairs can be viewed within transaction traces in APM, traced errors in APM, transaction events in dashboards, and page views in dashboards. You can customize exactly which attributes will be sent to each of these destinations.

These attribute settings apply to version 3.12.0 or higher of the Ruby agent.

## Ruby agent attributes [#attributes]

The following table lists the attributes that can be automatically captured by the Ruby agent:

**httpResponseCode**

The response status code for a web request. Defaults:

-   Transaction traces: Enabled
-   Error collector (traced errors): Enabled
-   Transaction events: Enabled
-   Page views (browser monitoring): Unavailable

    **Note:** The `httpResponseCode` attribute (string value) is deprecated as of agent version 6.12.0. `http.statusCode` (integer value) should be used instead.

**request.headers.referer**

The HTTP referrer header if present (minus the query string). Defaults:

-   Transaction traces: Disabled
-   Error collector (traced errors): Enabled
-   Transaction events: Disabled
-   Page views (browser monitoring): Unavailable

**request.parameters.\***

The HTTP request parameters are associated with the transaction. Available for Rails, Sinatra, Roda and Grape applications only. Defaults:

-   Transaction traces: Disabled
-   Error collector (traced errors): Disabled
-   Transaction events: Disabled
-   Page views (browser monitoring): Disabled

**job.resque.args.\***

Job arguments passed to the Resque worker. Arguments passed to Resque workers are positional. These arguments are stored as keys of the form `job.resque.args.<position>` where position is the index of the argument to the `perform` method. For example, a Resque job that takes two arguments will have keys `job.resque.args.0` and `job.resque.args.1`. Defaults:

-   Transaction traces: Disabled
-   Error collector (traced errors): Disabled
-   Transaction events: Disabled
-   Page views (browser monitoring): Unavailable

    **Note:** The `resque.capture_params` property is deprecated. However, if set to `true`, it will enable capture of Resque arguments for transaction traces, traced errors.

**job.sidekiq.args.\***

Job arguments passed to the Sidekiq worker. Arguments passed to Sidekiq workers are positional. These arguments are stored as keys of the form `job.sidekiq.args.<position>` where position is the index of the argument to the `perform` method. For example, a Sidekiq job that takes two arguments will have keys `job.sidekiq.args.0` and `job.sidekiq.args.1`. Defaults:

-   Transaction traces: Disabled
-   Error collector (traced errors): Disabled
-   Transaction events: Disabled
-   Page views (browser monitoring): Unavailable

    **Note:** The `sidekiq.capture_params` property is deprecated. However, if set to `true`, it will enable capture of Sidekiq arguments for transaction traces and traced errors.

## Adding custom attributes [#add-custom-attributes]

To capture additional custom attributes from your application, use `NewRelic::Agent.add_custom_attributes`. For full reference see [Collecting custom attributes](https://docs.newrelic.com/docs/apm/other-features/attributes/collecting-custom-attributes#ruby-att). Defaults:

-   Transaction traces: Enabled
-   Error collector (traced errors): Enabled
-   Transaction events: Enabled
-   Page views (browser monitoring): Disabled

> #### ⚠️ CAUTION
>
> If you want to query your custom parameters or attributes, avoid using any of the [reserved terms](https://docs.newrelic.com/docs/insights/event-data-sources/custom-events/data-requirements-limits-custom-event-data/#reserved-words) for naming them.

## Upgrading the Ruby agent [#upgrading]

When upgrading to Ruby agent **3.12.0** or higher, upgrade your **newrelic.yml** configuration.
