• English日本語한국어
  • Log inStart now

newrelic_accept_distributed_trace_payload (PHP agent API)

Syntax

newrelic_accept_distributed_trace_payload (string $payload)

Accepts a distributed trace payload.

Requirements

Requires PHP agent version 8.4 or higher.

Description

Distributed tracing allows you to see the path that a request takes as it travels through a distributed system.

Important

With PHP agent version 9.10 or higher, the following JSON functions are now considered deprecated and will be removed in a future release:

newrelic_create_distributed_trace_payload()
newrelic_accept_distributed_trace_payload($payload)
newrelic_accept_distributed_trace_payload_httpsafe($payload)

Instead, use the API that is compatible with W3C Trace Context support, added in agent version 9.8. With this, the API for manually instrumenting applications has changed from the JSON payload related functions to the following header array forms:

newrelic_insert_distributed_trace_headers($outbound_headers)
newrelic_accept_distributed_trace_headers($inbound_headers)

Parameters

Parameter

Description

$payload

string

Required: a JSON formatted string created by using newrelic_create_distributed_trace_payload.

Examples

For examples of how and when to use this API method, see the documentation to manually instrument applications and services.

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.