---
title: Agent attributes
source: https://docs.newrelic.com/docs/apm/agents/manage-apm-agents/agent-data/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 in some places in the UI, or by querying that data using NRQL. New Relic gives users the ability to customize exactly which attributes will be sent to each of these [destinations](#destinations).

You can also collect [custom attributes](https://docs.newrelic.com/docs/apm/other-features/attributes/collecting-custom-attributes) to send additional data to New Relic.

## Attribute destination flow [#destination-flow]

This diagram illustrates how an agent decides to send [attributes](#types) to each [destination](#destinations).

![nr attribute collection diagram.png](https://docs.newrelic.com/images/apm_diagram_attribute-collection-diagram.webp "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 [#types]

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, `http.statusCode` and `httpResponseMessage`.

## Destinations for attributes [#destinations]

Collected attributes appear in these locations:

| **Collected attributes**                                                                                                                             | **Location**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Transaction traces](https://docs.newrelic.com/docs/apm/transactions/transaction-traces/introduction-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](https://docs.newrelic.com/docs/apm/applications-menu/error-analytics/error-analytics-manage-error-traces)                            | If a transaction results in an error, these traced errors will be reported to APM. A traced error will contain attributes collected during the transaction.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| [Transaction events](https://docs.newrelic.com/docs/insights/insights-data-sources/default-events-attributes/apm-default-event-attributes)           | APM transactions will contain [attributes](https://docs.newrelic.com/docs/insights/new-relic-insights/decorating-events/insights-attributes) collected during the transaction.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [Browser events](https://docs.newrelic.com/docs/insights/insights-data-sources/default-events-attributes/browser-default-events-attributes-insights) | Browser monitoring events will contain [attributes](https://docs.newrelic.com/docs/insights/new-relic-insights/decorating-events/insights-attributes) collected during the transaction. However, attributes collected at the end of a transaction may not appear on `PageView` events. This destination is also called browser monitoring.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| [Span events](https://docs.newrelic.com/docs/apm/distributed-tracing/getting-started/introduction-distributed-tracing)                               | 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: - [Java agent 5.13.0 and above](https://docs.newrelic.com/docs/release-notes/agent-release-notes/java-release-notes/java-agent-5130) - [Go agent 3.6.0 and above](https://docs.newrelic.com/docs/release-notes/agent-release-notes/go-release-notes/go-agent-360) - [.NET agent 8.25 and above](https://docs.newrelic.com/docs/release-notes/agent-release-notes/net-release-notes/net-agent-8252140) - [Node.js agent 6.10.0 and above](https://docs.newrelic.com/docs/release-notes/agent-release-notes/nodejs-release-notes/node-agent-6-10-0/) - [PHP agent 9.12.0.268 and above](https://docs.newrelic.com/docs/release-notes/agent-release-notes/php-release-notes/php-agent-9120268) - [Python agent 5.8.0.136 and above](https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-580136) - [Ruby agent 6.8.0 and above](https://docs.newrelic.com/docs/release-notes/agent-release-notes/ruby-release-notes/ruby-agent-680360) |
| [Transaction segments](https://docs.newrelic.com/docs/apm/transactions/transaction-traces/transaction-traces-trace-details-page)                     | Each segment in a transaction trace will contain attributes recorded for that segment.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |

## Viewing request attributes [#viewing]

Request attributes are associated with specific transaction traces, browser traces, and errors in APM and dashboards. You can see the attributes recorded with a request when viewing the individual [trace](https://docs.newrelic.com/docs/apm/transactions/transaction-traces/introduction-transaction-traces#find-view) or [error](https://docs.newrelic.com/docs/apm/applications-menu/error-analytics/error-analytics-explore-events-behind-errors). Custom attributes can be [queried via NRQL](https://docs.newrelic.com/docs/insights/nrql-new-relic-query-language/nrql-resources/nrql-syntax-components-functions#syntax) exactly like any other attribute.

![screen-tx-trace-attributes.png](https://docs.newrelic.com/images/apm_screenshot-crop_request-attributes.webp "screen-tx-trace-attributes.png")

**[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > APM & services > (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.

## Limits [#attlimits]

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

| **Parameter**   | **Limitations**                                                                                               |
| --------------- | ------------------------------------------------------------------------------------------------------------- |
| Transaction     | 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 [#agent-specific]

Each APM agent [collects custom attributes](https://docs.newrelic.com/docs/agents/manage-apm-agents/agent-data/collect-custom-attributes). The supported attributes depend on the specific agent:

-   [Go](https://docs.newrelic.com/docs/agents/go-agent/instrumentation/go-agent-attributes)
-   [Java](https://docs.newrelic.com/docs/agents/java-agent/attributes/enabling-disabling-attributes-java)
-   [.NET](https://docs.newrelic.com/docs/agents/net-agent/attributes/net-agent-attributes)
-   [Node.js](https://docs.newrelic.com/docs/agents/nodejs-agent/attributes/nodejs-agent-attributes)
-   [PHP](https://docs.newrelic.com/docs/agents/php-agent/attributes/php-agent-attributes)
-   [Python](https://docs.newrelic.com/docs/agents/python-agent/attributes/python-agent-attributes)
-   [Ruby](https://docs.newrelic.com/docs/agents/ruby-agent/attributes/ruby-agent-attributes)
