Span event attributes

New Relic's distributed tracing created Span events that can be queried in New Relic Insights. This document lists and defines the default attributes available for Span events. For sample Insights queries using these attributes, see Example queries.

Access to this feature requires APM Pro.

General span event attributes

Distributed tracing collects mostly Span events, but Transaction events and TransactionError events can also be part of a distributed trace.

The following are default attributes available for Span events. Some attributes will only be present for spans that are included in a trace, not for spans that are collected but left out of a trace.

Attribute Description
appId The ID of your application, as reported by New Relic.
appName The name of your application. In many cases, this may be the app server's name. When an APM app alias is set, this value is based on that alias value.
category The span type category, such as generic, datastore, or http (external). The type of span dictates UI display options, such as the charts available, and the collection of additional attributes. For more on span types, see Span types.
duration Span's elapsed time in seconds.
entityGuid The GUID of the New Relic-monitored entity.
guid The segment identifier.
host The name of the application host that processed this request.
name The segment name.
parentId The span parent's GUID (may not be present for the root span).
priority A float value indicating likelihood of being saved.
realAgentId The ID of the New Relic agent that is reporting.
sampled Whether the request route should be chosen for tracing.
timestamp Unix timestamp in milliseconds when the segment started.
traceId The trace ID allows the linkage of spans in a distributed trace.
transactionId The transaction's GUID.

Different span types collect additional attributes:

Datastore span attributes

These attributes are collected for datastore spans (spans where category = datastore):

Attribute Description
component The name of the database vendor or driver.
db.statement The database statement in the format most permissive by configuration.
db.instance The database name.
peer.address The address of the datastore, including the host name and the port, path, or id. For example: "{host}:{port}".
peer.hostname The hostname of the database.
span.kind Datastore spans will always have the value client.

External span attributes

These attributes are collected for external spans (spans where category = http).

Attribite Description
http.url The external URI for the call.
http.method The HTTP method or language method / function used for the call.
component The name of the framework being used to make the connection
span.kind External spans will always have the value client.

For more help

Recommendations for learning more: