• /
  • Log in
  • Free account

Agent attributes

Attributes are key-value pairs containing information that determines the properties of an event or transaction. You can view these key-value pairs within transaction traces, and in Insights or other products which use event data. New Relic gives users the ability to customize exactly which attributes will be sent to each of these destinations.

You can also collect custom attributes to send additional data to APM and Insights.

Attribute destination flow

This diagram illustrates how an agent decides to send attributes to each destination.

nr attribute collection diagram.png

Agent attribute collection: An agent makes three different decisions when sending an attribute to any New Relic destination based on the relevant property settings. Property names and syntax vary by agent. (The properties in this diagram are specific to the PHP agent, but the general flow is the same for all agents. Property names and syntax vary by agent.)

Types of attributes

Attributes can be collected in a variety of ways:

  • Message property attributes: These are the properties set on a message received from a queue or topic.
  • HTTP request attributes: These are the parameters for an HTTP request.
  • User attributes: These are attributes provided by the user through each agent's API.
  • Agent attributes: These are attributes captured by the agent; for example, httpResponseCode and httpResponseMessage.

Destinations for attributes

Collected attributes appear in these locations:

Collected attributes


Transaction traces

Each minute transaction traces collect data for your slowest individual HTTP requests. These traces will report attributes collected during the transaction.

Traced errors

If a transaction results in an error, these traced errors will be reported to New Relic APM. A traced error will contain attributes collected during the transaction.

Insights transaction events

APM transactions that are reported to New Relic Insights will contain attributes collected during the transaction.

Insights page views

Browser page views reported to New Relic Insights will contain attributes collected during the transaction. However, attributes collected at the end of a transaction may not appear under Insights PageView events. This destination is also called browser monitoring.

Span events

Span events collected for distributed tracing will contain attributes collected during the span.

The following agents support the addition of custom user attributes to span events:

Transaction segments

Each segment in a transaction trace will contain attributes recorded for that segment.

Viewing request attributes

Request attributes are associated with specific transaction traces, browser traces, and errors in New Relic APM and New Relic Insights. You can see the attributes recorded with a request when viewing the individual trace or error. In Insights, custom attributes can be queried via NRQL exactly like any other attribute.


APM > (select an app) > Monitoring > Transactions > (select a transaction) > (select a trace): Here is an example from the Ruby agent of the Request attributes and Custom attributes for a transaction trace. Exact attributes depend on your agent and on your attribute configuration.


User attributes, request attributes, and message queue parameters are limited by count and size.




Limited to 64 user attributes

Attribute key

Limited to 256 bytes each

If the key is more than 256 bytes, then the attribute will not be recorded.

Attribute value

Limited to 256 bytes each

If the value is greater than 256 bytes, then the attribute value will be truncated.

Agent-specific attributes

Each New Relic APM agent collects custom attributes. The supported attributes depend on the specific agent:

For more help

If you need more help, check out these support and learning resources:

Create issueEdit page
Copyright © 2021 New Relic Inc.