---
title: Node.js agent attributes settings
source: https://docs.newrelic.com/docs/apm/agents/nodejs-agent/installation-configuration/nodejs-agent-configuration-attributes-settings
---

This page covers the Node.js agent settings for controlling which attributes are captured and forwarded across transactions, errors, browser monitoring, and span events.

> #### 💡 TIP
>
> Back to the full settings index: [Node.js agent configuration](https://docs.newrelic.com/docs/apm/agents/nodejs-agent/installation-configuration/nodejs-agent-configuration)

## Attributes [#node-js-attributes]

This section defines the variables for [Node.js agent attributes](https://docs.newrelic.com/docs/agents/nodejs-agent/attributes/nodejs-agent-attributes) in the order they typically appear in the `attributes: {` section of your app's `newrelic.js` configuration file.

> #### ⚠️ CAUTION
>
> Any header-related include/exclude rules must be in camelCase form to be filtered.

**enabled**

| Type                             | Boolean                        |
| -------------------------------- | ------------------------------ |
| Default                          | `true`                         |
| [Environ variable](#environment) | `NEW_RELIC_ATTRIBUTES_ENABLED` |

If `true`, enables capture of attributes for all destinations.

**exclude**

| Type                             | Array                          |
| -------------------------------- | ------------------------------ |
| Default                          | `[]`                           |
| [Environ variable](#environment) | `NEW_RELIC_ATTRIBUTES_EXCLUDE` |

Prefix of attributes to exclude from all destinations. Allows `*` as wildcard at end. For example, in the config file, this would include all parameters except `somethingSecret`:

````js
attributes: {
  include: [ 'request.parameters.*' ],
  exclude: [ 'request.parameters.somethingSecret' ]
}
```

````

**include**

| Type                             | Array                          |
| -------------------------------- | ------------------------------ |
| Default                          | `[]`                           |
| [Environ variable](#environment) | `NEW_RELIC_ATTRIBUTES_INCLUDE` |

Prefix of attributes to include from all destinations. Allows `*` as wildcard at end.

For example, in the `config` file, this would include all parameters:

````js
attributes: {
  include: [ 'request.parameters.*' ]
}
```

Using this example Express route definition and request URL:

```js
app.get('/api/users/:id', myMiddleware, myController)
```

```sh
curl http://localhost:3000/api/users/abc123?id=true
```

The _route parameter_ is `id`, and has a value of `abc123`. This becomes the attribute `request.parameters.route.id: abc123` on the Transaction, root Segment, and Span. This example also has a _query parameter_ of `id`, which has a value of `true`. This would become the attribute `request.parameters.id: true` on the Transaction, root Segment, and Span.


````

**include_enabled**

| Type                             | Boolean                                |
| -------------------------------- | -------------------------------------- |
| Default                          | `true`                                 |
| [Environ variable](#environment) | `NEW_RELIC_ATTRIBUTES_INCLUDE_ENABLED` |

When `true`, patterns may be added to the [`attributes.include`](https://docs.newrelic.com/docs/agents/nodejs-agent/attributes/nodejs-agent-attributes#cfg-attributes-include) list.
