모바일 이벤트를 위한 시맨틱 컨벤션
Status: Development
출처: 문서
본문
이 문서는 모바일 플랫폼에서 이벤트를 내보내는 계측을 위한 시맨틱 컨벤션을 정의해요. 모든 모바일 이벤트는 EventName LogRecord 속성에 device 네임스페이스를 반드시 사용해야 해요.
-
Lifecycle 계측
-
Event:
device.app.lifecycle
Lifecycle 계측
이 섹션은 애플리케이션 수명주기(lifecycle)를 계측할 때 시맨틱 컨벤션을 적용하는 방법을 정의해요.
Event: device.app.lifecycle
Status:
이벤트 이름은 반드시 device.app.lifecycle 이어야 해요.
이 이벤트는 Android 또는 iOS 플랫폼에서 수명주기 전환이 발생했음을 나타내요.
이벤트 본문 필드는 이벤트 발생 시점의 애플리케이션 상태를 설명하는 데 사용해야 해요.
이 이벤트는 os.name 리소스 시맨틱 컨벤션과 함께 사용하여 모바일 운영체제(예: Android, iOS)를 식별하기 위한 것이에요.
android.app.state 와 ios.app.state 필드는 상호 배타적이므로 함께 사용해서는 안 되며, 각 필드는 해당하는 os.name 값과 함께 사용해야 해요.
속성:
| | Key | Stability | Requirement Level | Value Type | Description | Example Values
| android.app.state | | Conditionally Required if and only if os.name is android | string | This attribute represents the state of the application. [1] | created
| ios.app.state | | Conditionally Required if and only if os.name is ios | string | This attribute represents the state of the application. [2] | active; inactive; background
[1] android.app.state: The Android lifecycle states are defined in Activity lifecycle callbacks, and from which the OS identifiers are derived.
[2] ios.app.state: The iOS lifecycle states are defined in the UIApplicationDelegate documentation, and from which the OS terminology column values are derived.
android.app.state 는 다음과 같은 잘 알려진 값 목록을 가져요. 그중 하나가 해당된다면 해당 값을 반드시 사용해야 하고, 그렇지 않다면 사용자 정의 값을 사용해도 돼요.
|
| Value | Description | Stability
| background | Any time after Activity.onPause() or, if the app has no Activity, Context.stopService() has been called when the app was in the foreground state. |
| created | Any time before Activity.onResume() or, if the app has no Activity, Context.startService() has been called in the app for the first time. |
| foreground | Any time after Activity.onResume() or, if the app has no Activity, Context.startService() has been called when the app was in either the created or background states. |
ios.app.state 는 다음과 같은 잘 알려진 값 목록을 가져요. 그중 하나가 해당된다면 해당 값을 반드시 사용해야 하고, 그렇지 않다면 사용자 정의 값을 사용해도 돼요.
|
| Value | Description | Stability
| active | The app has become active. Associated with UIKit notification applicationDidBecomeActive. |
| background | The app is now in the background. This value is associated with UIKit notification applicationDidEnterBackground. |
| foreground | The app is now in the foreground. This value is associated with UIKit notification applicationWillEnterForeground. |
| inactive | The app is now inactive. Associated with UIKit notification applicationWillResignActive. |
| terminate | The app is about to terminate. Associated with UIKit notification applicationWillTerminate. |