• EnglishEspañol日本語한국어Português
  • 로그인지금 시작하기

사용자의 편의를 위해 제공되는 기계 번역입니다.

In the event of any inconsistency between the English version and the translated version, the English versionwill take priority. Please visit this page for more information.

문제 신고

newrelic_create_distributed_trace_payload(PHP 에이전트 API)

통사론

newrelic_create_distributed_trace_payload()

분산 추적 페이로드를 만듭니다.

요구 사항

PHP 에이전트 버전 8.4 이상이 필요합니다.

설명

분산 추적을 사용하면 요청이 분산 시스템을 통과할 때 이동하는 경로를 볼 수 있습니다.

중요

PHP 에이전트 버전 9.10 이상에서는 다음 JSON 함수가 더 이상 사용되지 않는 것으로 간주되어 향후 릴리스에서 제거됩니다.

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

대신 에이전트 버전 9.8에 추가된 W3C 추적 컨텍스트 지원과 호환되는 API를 사용하십시오. 이에 따라 애플리케이션을 수동으로 계측하기 위한 API가 JSON 페이로드 관련 함수에서 다음 헤더 배열 형식으로 변경되었습니다.

newrelic_insert_distributed_trace_headers($outbound_headers)
newrelic_accept_distributed_trace_headers($inbound_headers)

반환 값

이 메서드는 newrelic\DistributedTracePayload. 유형의 개체를 반환합니다. 이 개체에는 분산 추적 페이로드를 텍스트로 렌더링하는 두 가지 메서드가 있습니다.

$payload = newrelic_create_distributed_trace_payload(); // renders the payload as a JSON string
$jsonText = $payload->text(); // renders the payload as an string suitable for transport via HTTP (query string, POST param, HTTP headers, etc.)
$httpSafeString = $payload->httpSafe();

이 API 메서드를 언제 어떻게 사용하는지에 대한 예는 애플리케이션 및 서비스를 수동으로 계측 하는 설명서를 참조하십시오.

Copyright © 2024 New Relic Inc.

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