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
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,
Destinations for attributes
Collected attributes appear in these locations:
|Transaction traces||Each minute transaction traces collect data for your slowest individual HTTP requests. These traces will report attributes collected during the transaction.|
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
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:
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.
User attributes, request attributes, and message queue parameters are limited by count and size.
|Transaction||Limited to 64 user attributes|
Limited to 256 bytes each
If the key is more than 256 bytes, then the attribute will not be recorded.
Limited to 256 bytes each
If the value is greater than 256 bytes, then the attribute value will be truncated.
Each New Relic APM agent collects custom attributes. The supported attributes depend on the specific agent: