5.0 KiB
Semantic conventions for mobile events
Status: Development
This document defines semantic conventions for instrumentations that emit
events on mobile platforms. All mobile events MUST use a namespace of
device in the EventName LogRecord property.
Lifecycle instrumentation
This section defines how to apply semantic conventions when instrumenting application lifecycle.
Event: device.app.lifecycle
The event name MUST be device.app.lifecycle.
This event represents an occurrence of a lifecycle transition on Android or iOS platform.
The event body fields MUST be used to describe the state of the application at the time of the event.
This event is meant to be used in conjunction with os.name resource semantic convention to identify the mobile operating system (e.g. Android, iOS).
The android.app.state and ios.app.state fields are mutually exclusive and MUST NOT be used together, each field MUST be used with its corresponding os.name value.
| Attribute | Type | Description | Examples | Requirement Level | Stability |
|---|---|---|---|---|---|
android.app.state |
string | This attribute represents the state of the application. [1] | created |
Conditionally Required if and only if os.name is android |
|
ios.app.state |
string | This attribute represents the state of the application. [2] | active; inactive; background |
Conditionally Required if and only if os.name is ios |
[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 has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
ios.app.state has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.