You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| <aid="android-app-state"href="#android-app-state">`android.app.state`</a> | string | This attribute represents the state of the application. [1]|`created`||
15
16
| <aid="android-os-api-level"href="#android-os-api-level">`android.os.api_level`</a> | string | Uniquely identifies the framework API revision offered by a version (`os.version`) of the android operating system. More information can be found [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels). |`33`; `32`||
16
17
18
+
**[1]`android.app.state`:** The Android lifecycle states are defined in [Activity lifecycle callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc), and from which the `OS identifiers` are derived.
19
+
20
+
---
21
+
22
+
`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.
23
+
24
+
| Value | Description | Stability |
25
+
|---|---|---|
26
+
|`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. ||
27
+
|`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. ||
28
+
|`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. ||
29
+
17
30
## Deprecated Android Attributes
18
31
19
32
This document defines attributes that represents an occurrence of a lifecycle transition on the Android platform.
| <aid="android-state"href="#android-state">`android.state`</a> | string | Deprecated use the `device.app.lifecycle` event definition including `android.state`as a payload field instead. [1]|`created`; `background`; `foreground`|<br>Replaced by `device.app.lifecycle`.|
36
+
| <aid="android-state"href="#android-state">`android.state`</a> | string | Deprecated. Use `android.app.state` instead. [2]|`created`; `background`; `foreground`|<br>Renamed to `android.app.state`|
24
37
25
-
**[1]`android.state`:** The Android lifecycle states are defined in [Activity lifecycle callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc), and from which the `OS identifiers` are derived.
38
+
**[2]`android.state`:** The Android lifecycle states are defined in [Activity lifecycle callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc), and from which the `OS identifiers` are derived.
| <aid="ios-app-state"href="#ios-app-state">`ios.app.state`</a> | string | This attribute represents the state of the application. [1]|`active`; `inactive`; `background`||
16
+
17
+
**[1]`ios.app.state`:** The iOS lifecycle states are defined in the [UIApplicationDelegate documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate), and from which the `OS terminology` column values are derived.
18
+
19
+
---
20
+
21
+
`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.
22
+
23
+
| Value | Description | Stability |
24
+
|---|---|---|
25
+
|`active`| The app has become `active`. Associated with UIKit notification `applicationDidBecomeActive`. ||
26
+
|`background`| The app is now in the background. This value is associated with UIKit notification `applicationDidEnterBackground`. ||
27
+
|`foreground`| The app is now in the foreground. This value is associated with UIKit notification `applicationWillEnterForeground`. ||
28
+
|`inactive`| The app is now `inactive`. Associated with UIKit notification `applicationWillResignActive`. ||
29
+
|`terminate`| The app is about to terminate. Associated with UIKit notification `applicationWillTerminate`. ||
30
+
6
31
## Deprecated iOS Attributes
7
32
8
33
The iOS platform on which the iOS application is running.
| <aid="ios-state"href="#ios-state">`ios.state`</a> | string | Deprecated use the `device.app.lifecycle` event definition including `ios.state`as a payload field instead. [1]|`active`; `inactive`; `background`|<br>Moved to a payload field of `device.app.lifecycle`.|
37
+
| <aid="ios-state"href="#ios-state">`ios.state`</a> | string | Deprecated. use the `ios.app.state` instead. [2]|`active`; `inactive`; `background`|<br>Renamed to `ios.app.state`|
13
38
14
-
**[1]`ios.state`:** The iOS lifecycle states are defined in the [UIApplicationDelegate documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate), and from which the `OS terminology` column values are derived.
39
+
**[2]`ios.state`:** The iOS lifecycle states are defined in the [UIApplicationDelegate documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate), and from which the `OS terminology` column values are derived.
Copy file name to clipboardexpand all lines: docs/mobile/events.md
+12-10
Original file line number
Diff line number
Diff line change
@@ -39,28 +39,30 @@ This event represents an occurrence of a lifecycle transition on Android or iOS
39
39
40
40
The event body fields MUST be used to describe the state of the application at the time of the event.
41
41
This event is meant to be used in conjunction with `os.name`[resource semantic convention](/docs/resource/os.md) to identify the mobile operating system (e.g. Android, iOS).
42
-
The `android.state` and `ios.state` fields are mutually exclusive and MUST NOT be used together, each field MUST be used with its corresponding `os.name` value.
42
+
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.
43
43
44
-
**Body fields:**
45
-
46
-
| Body Field | Type | Description | Examples |[Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/)| Stability |
|`android.state`| enum | This attribute represents the state the application has transitioned into at the occurrence of the event. [1]|`created`|`Conditionally Required` if and only if `os.name` is `android`||
49
-
|`ios.state`| enum | This attribute represents the state the application has transitioned into at the occurrence of the event. [2]|`active`|`Conditionally Required` if and only if `os.name` is `ios`||
46
+
|[`android.app.state`](/docs/attributes-registry/android.md)| string | This attribute represents the state of the application. [1]|`created`|`Conditionally Required` if and only if `os.name` is `android`||
47
+
|[`ios.app.state`](/docs/attributes-registry/ios.md)| string | This attribute represents the state of the application. [2]|`active`; `inactive`; `background`|`Conditionally Required` if and only if `os.name` is `ios`||
48
+
49
+
**[1]`android.app.state`:** The Android lifecycle states are defined in [Activity lifecycle callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc), and from which the `OS identifiers` are derived.
50
50
51
-
**[1]:** The Android lifecycle states are defined in [Activity lifecycle callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc), and from which the `OS identifiers` are derived.
51
+
**[2]`ios.app.state`:** The iOS lifecycle states are defined in the [UIApplicationDelegate documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate), and from which the `OS terminology` column values are derived.
52
52
53
-
**[2]:** The iOS lifecycle states are defined in the [UIApplicationDelegate documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate), and from which the `OS terminology` column values are derived.
53
+
---
54
54
55
-
`android.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.
55
+
`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.
56
56
57
57
| Value | Description | Stability |
58
58
|---|---|---|
59
59
|`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. ||
60
60
|`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. ||
61
61
|`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. ||
62
62
63
-
`ios.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.
63
+
---
64
+
65
+
`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.
Copy file name to clipboardexpand all lines: model/android/deprecated/registry-deprecated.yaml
+2-4
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,8 @@ groups:
7
7
attributes:
8
8
- id: android.state
9
9
stability: development
10
-
deprecated: "Replaced by `device.app.lifecycle`."
11
-
brief: >
12
-
Deprecated use the `device.app.lifecycle` event definition including
13
-
`android.state` as a payload field instead.
10
+
deprecated: "Renamed to `android.app.state`"
11
+
brief: Deprecated. Use `android.app.state` instead.
14
12
note: >
15
13
The Android lifecycle states are defined in [Activity lifecycle callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc),
This attribute represents the state of the application.
20
+
note: >
21
+
The Android lifecycle states are defined in [Activity lifecycle callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc),
22
+
and from which the `OS identifiers` are derived.
23
+
examples: [ "created" ]
24
+
type:
25
+
members:
26
+
- id: created
27
+
value: 'created'
28
+
brief: >
29
+
Any time before Activity.onResume() or, if the app has no Activity, Context.startService()
30
+
has been called in the app for the first time.
31
+
stability: development
32
+
- id: background
33
+
value: 'background'
34
+
brief: >
35
+
Any time after Activity.onPause() or, if the app has no Activity,
36
+
Context.stopService() has been called when the app was in the foreground state.
37
+
stability: development
38
+
- id: foreground
39
+
value: 'foreground'
40
+
brief: >
41
+
Any time after Activity.onResume() or, if the app has no Activity,
42
+
Context.startService() has been called when the app was in either the created or background states.
Copy file name to clipboardexpand all lines: model/device/events.yaml
+10-78
Original file line number
Diff line number
Diff line change
@@ -13,81 +13,13 @@ groups:
13
13
[resource semantic convention](/docs/resource/os.md) to identify the
14
14
mobile operating system (e.g. Android, iOS).
15
15
16
-
The `android.state` and `ios.state` fields are mutually exclusive and MUST
17
-
NOT be used together, each field MUST be used with its corresponding
18
-
`os.name` value.
19
-
body:
20
-
id: device_lifecycle_state
21
-
type: map
22
-
requirement_level: required
23
-
stability: development
24
-
fields:
25
-
- id: ios.state
26
-
stability: development
27
-
requirement_level:
28
-
conditionally_required: if and only if `os.name` is `ios`
29
-
note: >
30
-
The iOS lifecycle states are defined in the [UIApplicationDelegate documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate),
31
-
and from which the `OS terminology` column values are derived.
32
-
brief: >
33
-
This attribute represents the state the application has transitioned into at the occurrence of the event.
34
-
examples: ["active"]
35
-
type: enum
36
-
members:
37
-
- id: active
38
-
value: 'active'
39
-
brief: >
40
-
The app has become `active`. Associated with UIKit notification `applicationDidBecomeActive`.
41
-
stability: development
42
-
- id: inactive
43
-
value: 'inactive'
44
-
brief: >
45
-
The app is now `inactive`. Associated with UIKit notification `applicationWillResignActive`.
46
-
stability: development
47
-
- id: background
48
-
value: 'background'
49
-
brief: >
50
-
The app is now in the background.
51
-
This value is associated with UIKit notification `applicationDidEnterBackground`.
52
-
stability: development
53
-
- id: foreground
54
-
value: 'foreground'
55
-
brief: >
56
-
The app is now in the foreground.
57
-
This value is associated with UIKit notification `applicationWillEnterForeground`.
58
-
stability: development
59
-
- id: terminate
60
-
value: 'terminate'
61
-
brief: >
62
-
The app is about to terminate. Associated with UIKit notification `applicationWillTerminate`.
63
-
stability: development
64
-
- id: android.state
65
-
stability: development
66
-
requirement_level:
67
-
conditionally_required: if and only if `os.name` is `android`
68
-
brief: >
69
-
This attribute represents the state the application has transitioned into at the occurrence of the event.
70
-
note: >
71
-
The Android lifecycle states are defined in [Activity lifecycle callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc),
72
-
and from which the `OS identifiers` are derived.
73
-
examples: ["created"]
74
-
type: enum
75
-
members:
76
-
- id: created
77
-
value: 'created'
78
-
brief: >
79
-
Any time before Activity.onResume() or, if the app has no Activity, Context.startService()
80
-
has been called in the app for the first time.
81
-
stability: development
82
-
- id: background
83
-
value: 'background'
84
-
brief: >
85
-
Any time after Activity.onPause() or, if the app has no Activity,
86
-
Context.stopService() has been called when the app was in the foreground state.
87
-
stability: development
88
-
- id: foreground
89
-
value: 'foreground'
90
-
brief: >
91
-
Any time after Activity.onResume() or, if the app has no Activity,
92
-
Context.startService() has been called when the app was in either the created or background states.
93
-
stability: development
16
+
The `android.app.state` and `ios.app.state` fields are mutually
17
+
exclusive and MUST NOT be used together, each field MUST be
18
+
used with its corresponding `os.name` value.
19
+
attributes:
20
+
- ref: ios.app.state
21
+
requirement_level:
22
+
conditionally_required: if and only if `os.name` is `ios`
23
+
- ref: android.app.state
24
+
requirement_level:
25
+
conditionally_required: if and only if `os.name` is `android`
Copy file name to clipboardexpand all lines: model/ios/deprecated/registry-deprecated.yaml
+2-4
Original file line number
Diff line number
Diff line change
@@ -7,13 +7,11 @@ groups:
7
7
attributes:
8
8
- id: ios.state
9
9
stability: development
10
-
deprecated: "Moved to a payload field of `device.app.lifecycle`."
10
+
deprecated: "Renamed to `ios.app.state`"
11
+
brief: Deprecated. use the `ios.app.state` instead.
11
12
note: >
12
13
The iOS lifecycle states are defined in the [UIApplicationDelegate documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate),
13
14
and from which the `OS terminology` column values are derived.
14
-
brief: >
15
-
Deprecated use the `device.app.lifecycle` event definition including
0 commit comments