---
title: newrelic_accept_distributed_trace_headers
source: https://docs.newrelic.com/docs/apm/agents/php-agent/php-agent-api/newrelicacceptdistributedtraceheaders
---

## Syntax

```php
newrelic_accept_distributed_trace_headers (array $headers, string $transport_type)
```

Accepts an array of distributed trace headers.

## Requirements

Requires PHP agent [version 9.8 or higher](https://docs.newrelic.com/docs/release-notes/agent-release-notes/php-release-notes).

## Description

[Distributed tracing](https://docs.newrelic.com/docs/agents/php-agent/features/distributed-tracing-php) allows you to see the path that a request takes as it travels through a distributed system. When distributed tracing is enabled, use `newrelic_accept_distributed_trace_headers` to accept a payload of headers. These include both W3C Trace Context and New Relic distributed trace headers.

It is possible to only accept only W3C Trace Context headers and disable the New Relic Distributed Tracing header via the `newrelic.distributed_tracing_exclude_newrelic_header` INI setting.

## Parameters

| Parameter                  | Description                                                                                                                                                                                                                                 |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `$headers` _array_         | Required: an array containing distributed tracing headers.                                                                                                                                                                                  |
| `$transport_type` _string_ | Optional. A string overriding the default transport type. Default values: - `HTTP` for web traffic - `Unknown` for non-web traffic Additional accepted values: - `AMQP` - `HTTP` - `HTTPS` - `IronMQ` - `JMS` - `Kafka` - `Other` - `Queue` |

## Return values

Returns `true` if the headers were accepted successfully, otherwise returns `false`.

## Examples

For examples of how and when to use this API method, see the documentation to [manually instrument applications and services](https://docs.newrelic.com/docs/agents/php-agent/features/distributed-tracing-php#manual).
