• /
  • EnglishEspañol日本語한국어Português
  • Log inStart now

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.

You can also collect custom attributes to send additional data to New Relic.

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

Destinations for attributes

Collected attributes appear in these locations:

Collected attributes

Location

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 APM. A traced error will contain attributes collected during the transaction.

Transaction events

APM transactions will contain attributes collected during the transaction.

Browser events

Browser monitoring events will contain 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

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 APM and dashboards. You can see the attributes recorded with a request when viewing the individual trace or error. Custom attributes can be queried via NRQL exactly like any other attribute.

screen-tx-trace-attributes.png

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

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

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

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.