Node.js agent attributes

In New Relic products, attributes are key-value pairs collected from your application's transactions and events. New Relic's Node.js agent collects some basic attributes from the HTTP request and response headers.

Node.js agent attributes

The New Relic Node.js agent captures some basic HTTP header data by default, like the HTTP response code and the request method. New Relic refers to this default data as agent attributes. Data for attributes collected by the New Relic Node.js agent appears in:

  • Transaction events
  • Transaction traces
  • Error traces
  • Error events

You can also add custom instrumentation to capture any other attributes.

Here are the default attributes collected by the Node.js agent:


The type as read from the HTTP request's Accept header.

The name from the host's HTTP request header.


The incoming request referer as read from the Referer request header.


The contents of the User-Agent HTTP header.


The HTTP method of the incoming request.


The response status code for a web request.


The response status message for a web request, if present.


The outgoing response size in bytes as read from the Content-Length response header.


The outgoing response content type as read from the Content-Type response header.

Create custom attributes

To create custom attributes, use any of these options:

  • Create a custom event: Create a new event with the recordCustomEvent method, and associate custom attributes with it.
  • Add to existing transaction: Add a custom attribute to an existing transaction by using addCustomParameter.
  • Add multiple attributes: Use addCustomParameters.

For more help

Join the discussion about Node.js monitoring in the New Relic Online Technical Community! The Technical Community is a public platform to discuss and troubleshoot your New Relic toolset.

If you need additional help, get support at