• 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.

문제 신고

맞춤 이름 상호작용

중요

하이브리드 모바일 에이전트(React Native, .NET Maui 등)를 사용하는 경우 아래의 플랫폼별 방법을 참조하세요.

통사론

자바

NewRelic.setInteractionName(string $interactionName)

코틀린 [#kotlin]

NewRelic.setInteractionName(name: String?)

설명 [#description]

New Relic에서 이미 추적 중인 상호 작용의 새 이름을 설정합니다.

setInteractionName() 을 사용하여 계측 앱에서 상호작용의 이름을 변경합니다.

예를 들어, FragmentActivity 과 같은 단일 활동 이름 또는 baseclass.a 와 같은 난독화된 이름으로 보고되는 상호작용이 있고 상호작용의 이름을 더 설명적인 것으로 바꾸려고 합니다. 각 onCreate() 메서드의 시작 부분에 setInteractionName 를 사용하여 이름을 변경할 수 있습니다.

새 상호작용을 만들려면 startInteraction() 을(를) 참조하세요.

이 API 사용에 대한 일반적인 정보는 Android SDK API 사용 가이드 를 참조하세요.

매개변수 [#parameters]

매개변수

유형

설명

$interactionName

string

필수의. 상호 작용에 부여할 이름입니다.

예시 [#example]

이 예에서는 Activity 클래스의 일부로 onCreate() 메서드의 시작 부분에 NewRelic.setInteractionName() 사용합니다.

자바 [#java]

public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
//Rename the in-flight interaction
NewRelic.setInteractionName("Display MyCustomInteraction");
}
// ... continue methods ...
}

코틀린 [#kotlin]

NewRelic.setInteractionName("Display MyCustomInteraction")

통사론

목표-c

- (NSString*) customNewRelicInteractionName;

빠른 [#swift]

@objc func customNewRelicInteractionName() -> String

설명 [#description]

New Relic에 보고된 기본 상호 작용 이름의 이름을 바꾸도록 이름을 설정합니다.

UIViewController 에서 이 메소드를 구현하면 New Relic은 상호작용을 시작하기 전에 이 메소드를 호출하고( -viewDidLoad 또는 -viewDidAppear 에서) 상호작용의 이름을 반환된 문자열로 변경합니다(기본 이름 display <ViewControllerName> 대신). .

매개변수 [#parameters]

매개변수

유형

설명

customNewRelicInteractionName

string

필수의. 사용자 지정 상호 작용 이름입니다.

[#examples]

오브젝티브-C [#obj-c]

- (NSString*) customNewRelicInteractionName {
return @"CustomInteractionNameViewController";
}

빠른 [#swift]

@objc func customNewRelicInteractionName() -> String {
return "CustomInteractionNameViewController"
}
Copyright © 2024 New Relic Inc.

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