---
title: PHP agent attributes
source: https://docs.newrelic.com/docs/apm/agents/php-agent/attributes/php-agent-attributes
---

[Attributes](https://docs.newrelic.com/docs/features/agent-attributes) are key-value pairs containing information that determines the properties of an event or transaction. These key-value pairs can help you gain greater insight into your application and annotate the data in New Relic. Both default and [custom](https://docs.newrelic.com/docs/agents/manage-apm-agents/agent-data/collect-custom-attributes) attributes are visible in APM transaction traces, distributed traces, and error analytics; and [APM](https://docs.newrelic.com/docs/insights/explore-data/attributes/apm-default-attributes-insights) and [browser events](https://docs.newrelic.com/docs/insights/explore-data/attributes/browser-default-attributes-insights#browser-attributes-table).

You can customize exactly which attributes will be sent to each of these destinations. Read on to learn about the PHP agent attributes, how to enable or disable them, and the rules the agent follows to determine which attributes to include or exclude for a [destination](https://docs.newrelic.com/docs/features/agent-attributes#destinations).

## PHP agent attributes [#destination-flow]

In addition to the [default APM attributes](https://docs.newrelic.com/docs/insights/new-relic-insights/decorating-events/apm-default-attributes-insights#transaction-defaults), you can configure the following attributes in the PHP agent. See [PHP agent (`newrelic.ini`) settings](https://docs.newrelic.com/docs/php/php-agent-phpini-settings) and [Enabling and disabling attributes](https://docs.newrelic.com/docs/agents/php-agent/attributes/enabling-and-disabling-attributes) for more information.

**`response.statusCode`**

The response status code for a web request.

Defaults:

-   Transaction traces: Enabled
-   Error collector (traced errors): Enabled
-   Transaction events: Enabled
-   Page views (browser monitoring): Unavailable

**`newrelic_add_custom_parameter` API call**

Attributes added to an `newrelic_add_custom_parameter()` call on the New Relic API.

Defaults:

-   Transaction traces: Enabled
-   Error collector (traced errors): Enabled
-   Transaction events: Enabled
-   Page views (browser monitoring): Enabled

**`request.headers.accept`**

The types as read from the HTTP Accept request header.

Defaults:

-   Transaction traces: Enabled
-   Error collector (traced errors): Enabled
-   Transaction events: Enabled
-   Page views (browser monitoring): Unavailable

**`request.headers.contentType`**

The incoming request content-type as read from the Content-Type request header.

Defaults:

-   Transaction traces: Enabled
-   Error collector (traced errors): Enabled
-   Transaction events: Enabled
-   Page views (browser monitoring): Unavailable

**`request.headers.contentLength`**

The incoming request size in bytes as read from the Content-Length request header.

Defaults:

-   Transaction traces: Enabled
-   Error collector (traced errors): Enabled
-   Transaction events: Enabled
-   Page views (browser monitoring): Unavailable

**`request.headers.host`**

The name from the HTTP host request header.

Defaults:

-   Transaction traces: Enabled
-   Error collector (traced errors): Enabled
-   Transaction events: Enabled
-   Page views (browser monitoring): Unavailable

**`request.headers.referer`**

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

Defaults:

-   Transaction traces: Disabled
-   Error collector (traced errors): Enabled
-   Transaction events: Disabled
-   Page views (browser monitoring): Unavailable

**`request.headers.userAgent`**

The contents of the `User-Agent` HTTP header.

Defaults:

-   Transaction traces: Enabled
-   Error collector (traced errors): Enabled
-   Transaction events: Disabled
-   Page views (browser monitoring): Unavailable

**`request.method`**

The HTTP method of the incoming request.

Defaults:

-   Transaction traces: Enabled
-   Error collector (traced errors): Enabled
-   Transaction events: Enabled
-   Page views (browser monitoring): Unavailable

**`request.parameters.\*`**

Request parameters from the transaction.

> #### 💡 TIP
>
> The `capture_params` property has been deprecated. However, if set to `true`, it will enable request parameters for transaction traces and traced errors.

Defaults:

-   Transaction traces: Disabled
-   Error collector (traced errors): Disabled
-   Transaction events: Disabled
-   Page views (browser monitoring): Unavailable

**`request.uri`**

The request URI from the transaction.

Defaults

-   Transaction traces: Enabled
-   Error collector (traced errors): Enabled
-   Transaction events: Enabled
-   Page views (browser monitoring): Unavailable

**`response.headers.contentLength`**

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

Defaults:

-   Transaction traces: Enabled
-   Error collector (traced errors): Enabled
-   Transaction events: Enabled
-   Page views (browser monitoring): Unavailable

**`response.headers.contentType`**

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

Defaults:

-   Transaction traces: Enabled
-   Error collector (traced errors): Enabled
-   Transaction events: Enabled
-   Page views (browser monitoring): Unavailable

**`SERVER_NAME`**

The name of the server host under which the current script is executing.

Defaults

-   Transaction traces: Enabled
-   Error collector (traced errors): Enabled
-   Transaction events: Disabled
-   Page views (browser monitoring): Disabled

## Change where attributes are sent [#change-attribute-destination]

> #### 💡 TIP
>
> All destinations are open to attribute collection by default in the PHP agent, except `newrelic.browser_monitoring.attributes.enabled`.

To change which attributes are sent to New Relic [destinations](https://docs.newrelic.com/docs/apm/other-features/attributes/agent-attributes#destinations):

1.  Open or close any destination to attribute collection by changing the [`.enabled` destination property](https://docs.newrelic.com/docs/agents/php-agent/attributes/enabling-disabling-attributes#destination-on-off).
2.  Change the [default attribute setting](#attributes) by adding the attribute name to the destination's [`.include` or `.exclude` properties](https://docs.newrelic.com/docs/agents/php-agent/attributes/enabling-disabling-attributes#destination-attribute-specific).

    See [Attribute rules](https://docs.newrelic.com/docs/agents/php-agent/attributes/enabling-disabling-attributes#attruls) for which settings supersede each other.

## Upgrading the PHP agent [#upgrading]

When upgrading to PHP agent **4.9** or higher, upgrade your configuration file. For more information about deprecated properties, see [Enabling and disabling attributes](https://docs.newrelic.com/docs/php/php-agent-enabling-and-disabling-attributes#deprecated).
