• 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_set_user_id (PHP 에이전트 API)

통사론

newrelic_set_user_id(string $user_id)

고유한 사용자 ID를 현재 트랜잭션과 연결합니다.

요구 사항

에이전트 버전 10.12 이상.

설명

이 API를 사용하면 애플리케이션이 현재 트랜잭션에 고유한 사용자 ID를 할당할 수 있습니다.

이를 통해 사용자는 오류 이벤트의 영향과 같은 개별 최종 사용자에 대한 통찰력을 얻을 수 있습니다.

매개변수

매개변수

설명

$user_id ( 문자열 )

필수의.

현재 트랜잭션에 할당될 고유한 값(예: UUID)이어야 합니다.

반환 값

이 함수는 사용자 ID가 성공적으로 추가된 경우 true 반환하고, 그렇지 않으면 false 반환합니다.

function example() {
if (extension_loaded('newrelic')) { // Ensure PHP agent is available
$user_id = "YOUR UNIQUE USER ID";
newrelic_set_user_id($user_id);
}
}
Copyright © 2024 New Relic Inc.

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