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

문제 신고

NerdGraph 자습서: 모바일 에이전트 모니터링 예제

UI를 사용하는 대신 NerdGraph API에서 모바일 애플리케이션을 만들 수 있습니다. 이것의 장점은 New Relic으로 모바일 애플리케이션을 계측할 때 프로그래밍 방식으로 애플리케이션 토큰을 생성하고 검색하여 모바일 애플리케이션에 복사하여 붙여넣을 수 있다는 것입니다.

새 모바일 애플리케이션 만들기

다음은 새 모바일 애플리케이션을 만들기 위한 변형의 예입니다. 애플리케이션의 계정 ID와 이름을 제공해야 합니다.

돌연변이:

mutation CreateExampleMobileApplication($accountId: Int!, $name: String!) {
agentApplicationCreateMobile(accountId: $accountId, name: $name) {
accountId
applicationToken
guid
name
}
}

변수:

{
"accountId": Int!,
"name": String!
}

애플리케이션 토큰 검색

다음 쿼리를 사용하여 모바일 애플리케이션 토큰을 검색할 수 있습니다.

질문:

query FetchMobileApplicationToken($guid: EntityGuid!) {
actor {
entity(guid: "") {
... on MobileApplicationEntity {
guid
name
mobileProperties {
applicationToken
}
}
}
}
}

변수:

{
"guid": EntityGuid!
}

모바일 앱 이름 변경

다음은 New Relic에서 모바일 앱의 이름을 변경하는 변형의 예입니다.

돌연변이:

mutation UpdateMobileApplicationAlias($guid: EntityGuid!, $settings: $AgentApplicationSettingsUpdateInput) {
agentApplicationSettingsUpdate(guid: $guid, settings: $settings) {
alias
guid
errors {
description
errorClass
field
}
}
}

변수:

{
"guid": EntityGuid!,
"settings": {
"alias": String
}
}

모바일 모니터링 구성 예시

구성 방법의 예는 다음과 같습니다. NerdGraph를 통한 설정:

돌연변이:

mutation UpdateMobileSettingsExample(
$guid: EntityGuid!
$settings: AgentApplicationSettingsUpdateInput!
) {
agentApplicationSettingsUpdate(guid: $guid, settings: $settings) {
guid
errors {
description
errorClass
field
}
alias
mobileSettings {
networkSettings {
aliases {
alias
hosts
}
filterMode
hideList
ignoredStatusCodeRules {
hosts
statusCodes
}
showList
}
useCrashReports
}
}
}

변수:

{
"guid": EntityGuid!,
"settings": {
"alias": String,
"mobileSettings": {
"networkSettings": {
"aliases": [
{
"alias": String!,
"hosts": [String!]!
}
],
"filterMode": AgentApplicationSettingsNetworkFilterMode,
"hideList": [String!],
"ignoredStatusCodeRules": [
{
"hosts": [String!]!,
"statusCodes": [String!]!
}
],
"showList": [String!]
},
"useCrashReports": Boolean
}
}
}
Copyright © 2024 New Relic Inc.

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