Skip to content

Commit 8c4d698

Browse files
[chore] Move mobile events to the registry (#872)
Co-authored-by: Alexander Wert <[email protected]>
1 parent 48892b8 commit 8c4d698

File tree

10 files changed

+143
-71
lines changed

10 files changed

+143
-71
lines changed

.github/ISSUE_TEMPLATE/bug_report.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ body:
4545
- area:heroku
4646
- area:host
4747
- area:http
48+
- area:ios
4849
- area:k8s
4950
- area:messaging
5051
- area:network

.github/ISSUE_TEMPLATE/change_proposal.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ body:
3838
- area:heroku
3939
- area:host
4040
- area:http
41+
- area:ios
4142
- area:k8s
4243
- area:messaging
4344
- area:network

.github/ISSUE_TEMPLATE/new-conventions.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ body:
4747
- area:heroku
4848
- area:host
4949
- area:http
50+
- area:ios
5051
- area:k8s
5152
- area:messaging
5253
- area:network

docs/attributes-registry/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ Currently, the following namespaces exist:
5252
* [Heroku](heroku.md)
5353
* [Host](host.md)
5454
* [HTTP](http.md)
55+
* [iOS](ios.md)
5556
* [K8s](k8s.md)
5657
* [Network](network.md)
5758
* [OCI](oci.md)

docs/attributes-registry/android.md

+25
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,33 @@
11
# Android
22

3+
<!-- toc -->
4+
5+
- [Android Attributes](#android-attributes)
6+
- [Android Lifecycle Event Attributes](#android-lifecycle-event-attributes)
7+
8+
<!-- tocstop -->
9+
310
## Android Attributes
411
<!-- semconv registry.android(omit_requirement_level) -->
512
| Attribute | Type | Description | Examples | Stability |
613
|---|---|---|---|---|
714
| `android.os.api_level` | 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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
815
<!-- endsemconv -->
16+
17+
## Android Lifecycle Event Attributes
18+
19+
<!-- semconv registry.android.lifecycle.events(omit_requirement_level) -->
20+
| Attribute | Type | Description | Examples | Stability |
21+
|---|---|---|---|---|
22+
| `android.state` | string | This attribute represents the state the application has transitioned into at the occurrence of the event. [1] | `created` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
23+
24+
**[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.
25+
26+
`android.state` MUST be one of the following:
27+
28+
| Value | Description | Stability |
29+
|---|---|---|
30+
| `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. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
31+
| `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. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
32+
| `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. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
33+
<!-- endsemconv -->

docs/attributes-registry/ios.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!--- Hugo front matter used to generate the website version of this page:
2+
--->
3+
4+
# iOS
5+
6+
<!-- toc -->
7+
8+
- [iOS Lifecycle Event Attributes](#ios-lifecycle-event-attributes)
9+
10+
<!-- tocstop -->
11+
12+
## iOS Lifecycle Event Attributes
13+
14+
<!-- semconv registry.ios.lifecycle.events(omit_requirement_level) -->
15+
| Attribute | Type | Description | Examples | Stability |
16+
|---|---|---|---|---|
17+
| `ios.state` | string | This attribute represents the state the application has transitioned into at the occurrence of the event. [1] | `active` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
18+
19+
**[1]:** The iOS lifecycle states are defined in the [UIApplicationDelegate documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate#1656902), and from which the `OS terminology` column values are derived.
20+
21+
`ios.state` MUST be one of the following:
22+
23+
| Value | Description | Stability |
24+
|---|---|---|
25+
| `active` | The app has become `active`. Associated with UIKit notification `applicationDidBecomeActive`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
26+
| `inactive` | The app is now `inactive`. Associated with UIKit notification `applicationWillResignActive`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
27+
| `background` | The app is now in the background. This value is associated with UIKit notification `applicationDidEnterBackground`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
28+
| `foreground` | The app is now in the foreground. This value is associated with UIKit notification `applicationWillEnterForeground`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
29+
| `terminate` | The app is about to terminate. Associated with UIKit notification `applicationWillTerminate`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
30+
<!-- endsemconv -->

docs/mobile/events.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ mobile operating system (e.g. Android, iOS).
2323

2424
### iOS
2525

26-
<!-- semconv ios.lifecycle.events -->
26+
<!-- semconv ios.lifecycle.events(full) -->
2727
The event name MUST be `device.app.lifecycle`.
2828

2929
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
3030
|---|---|---|---|---|---|
31-
| `ios.state` | string | This attribute represents the state the application has transitioned into at the occurrence of the event. [1] | `active` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
31+
| [`ios.state`](../attributes-registry/ios.md) | string | This attribute represents the state the application has transitioned into at the occurrence of the event. [1] | `active` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
3232

3333
**[1]:** The iOS lifecycle states are defined in the [UIApplicationDelegate documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate#1656902), and from which the `OS terminology` column values are derived.
3434

@@ -45,12 +45,12 @@ The event name MUST be `device.app.lifecycle`.
4545

4646
### Android
4747

48-
<!-- semconv android.lifecycle.events -->
48+
<!-- semconv android.lifecycle.events(full) -->
4949
The event name MUST be `device.app.lifecycle`.
5050

5151
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
5252
|---|---|---|---|---|---|
53-
| `android.state` | string | This attribute represents the state the application has transitioned into at the occurrence of the event. [1] | `created` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
53+
| [`android.state`](../attributes-registry/android.md) | string | This attribute represents the state the application has transitioned into at the occurrence of the event. [1] | `created` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
5454

5555
**[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.
5656

model/logs/mobile-events.yaml

+2-67
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,17 @@
11
groups:
22
- id: ios.lifecycle.events
33
type: event
4-
prefix: ios
54
name: device.app.lifecycle
65
brief: >
76
This event represents an occurrence of a lifecycle transition on the iOS platform.
87
attributes:
9-
- id: state
10-
stability: experimental
8+
- ref: ios.state
119
requirement_level: "required"
12-
note: >
13-
The iOS lifecycle states are defined in the [UIApplicationDelegate documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate#1656902),
14-
and from which the `OS terminology` column values are derived.
15-
brief: >
16-
This attribute represents the state the application has transitioned into at the occurrence of the event.
17-
type:
18-
allow_custom_values: false
19-
members:
20-
- id: active
21-
value: 'active'
22-
brief: >
23-
The app has become `active`. Associated with UIKit notification `applicationDidBecomeActive`.
24-
stability: experimental
25-
- id: inactive
26-
value: 'inactive'
27-
brief: >
28-
The app is now `inactive`. Associated with UIKit notification `applicationWillResignActive`.
29-
stability: experimental
30-
- id: background
31-
value: 'background'
32-
brief: >
33-
The app is now in the background.
34-
This value is associated with UIKit notification `applicationDidEnterBackground`.
35-
stability: experimental
36-
- id: foreground
37-
value: 'foreground'
38-
brief: >
39-
The app is now in the foreground.
40-
This value is associated with UIKit notification `applicationWillEnterForeground`.
41-
stability: experimental
42-
- id: terminate
43-
value: 'terminate'
44-
brief: >
45-
The app is about to terminate. Associated with UIKit notification `applicationWillTerminate`.
46-
stability: experimental
4710
- id: android.lifecycle.events
4811
type: event
49-
prefix: android
5012
name: device.app.lifecycle
5113
brief: >
5214
This event represents an occurrence of a lifecycle transition on the Android platform.
5315
attributes:
54-
- id: state
55-
stability: experimental
16+
- ref: android.state
5617
requirement_level: required
57-
brief: >
58-
This attribute represents the state the application has transitioned into at the occurrence of the event.
59-
note: >
60-
The Android lifecycle states are defined in [Activity lifecycle callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc),
61-
and from which the `OS identifiers` are derived.
62-
type:
63-
allow_custom_values: false
64-
members:
65-
- id: created
66-
value: 'created'
67-
brief: >
68-
Any time before Activity.onResume() or, if the app has no Activity, Context.startService()
69-
has been called in the app for the first time.
70-
stability: experimental
71-
- id: background
72-
value: 'background'
73-
brief: >
74-
Any time after Activity.onPause() or, if the app has no Activity,
75-
Context.stopService() has been called when the app was in the foreground state.
76-
stability: experimental
77-
- id: foreground
78-
value: 'foreground'
79-
brief: >
80-
Any time after Activity.onResume() or, if the app has no Activity,
81-
Context.startService() has been called when the app was in either the created or background states.
82-
stability: experimental

model/registry/android.yaml

+34
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,37 @@ groups:
1313
(`os.version`) of the android operating system. More information can be found
1414
[here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels).
1515
examples: ['33', '32']
16+
- id: registry.android.lifecycle.events
17+
prefix: android
18+
type: attribute_group
19+
brief: >
20+
This document defines attributes that represents an occurrence of a lifecycle transition on the Android platform.
21+
attributes:
22+
- id: state
23+
stability: experimental
24+
brief: >
25+
This attribute represents the state the application has transitioned into at the occurrence of the event.
26+
note: >
27+
The Android lifecycle states are defined in [Activity lifecycle callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc),
28+
and from which the `OS identifiers` are derived.
29+
type:
30+
allow_custom_values: false
31+
members:
32+
- id: created
33+
value: 'created'
34+
brief: >
35+
Any time before Activity.onResume() or, if the app has no Activity, Context.startService()
36+
has been called in the app for the first time.
37+
stability: experimental
38+
- id: background
39+
value: 'background'
40+
brief: >
41+
Any time after Activity.onPause() or, if the app has no Activity,
42+
Context.stopService() has been called when the app was in the foreground state.
43+
stability: experimental
44+
- id: foreground
45+
value: 'foreground'
46+
brief: >
47+
Any time after Activity.onResume() or, if the app has no Activity,
48+
Context.startService() has been called when the app was in either the created or background states.
49+
stability: experimental

model/registry/ios.yaml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
groups:
2+
- id: registry.ios.lifecycle.events
3+
prefix: ios
4+
type: attribute_group
5+
brief: >
6+
The iOS platform on which the iOS application is running.
7+
attributes:
8+
- id: state
9+
stability: experimental
10+
note: >
11+
The iOS lifecycle states are defined in the [UIApplicationDelegate documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate#1656902),
12+
and from which the `OS terminology` column values are derived.
13+
brief: >
14+
This attribute represents the state the application has transitioned into at the occurrence of the event.
15+
type:
16+
allow_custom_values: false
17+
members:
18+
- id: active
19+
value: 'active'
20+
brief: >
21+
The app has become `active`. Associated with UIKit notification `applicationDidBecomeActive`.
22+
stability: experimental
23+
- id: inactive
24+
value: 'inactive'
25+
brief: >
26+
The app is now `inactive`. Associated with UIKit notification `applicationWillResignActive`.
27+
stability: experimental
28+
- id: background
29+
value: 'background'
30+
brief: >
31+
The app is now in the background.
32+
This value is associated with UIKit notification `applicationDidEnterBackground`.
33+
stability: experimental
34+
- id: foreground
35+
value: 'foreground'
36+
brief: >
37+
The app is now in the foreground.
38+
This value is associated with UIKit notification `applicationWillEnterForeground`.
39+
stability: experimental
40+
- id: terminate
41+
value: 'terminate'
42+
brief: >
43+
The app is about to terminate. Associated with UIKit notification `applicationWillTerminate`.
44+
stability: experimental

0 commit comments

Comments
 (0)