-
Notifications
You must be signed in to change notification settings - Fork 896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Device (Mobile) and OS Version Resource Semantic Attributes #1596
Merged
carlosalberto
merged 7 commits into
open-telemetry:main
from
Sherlouk:resource-device-conventions
May 20, 2021
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
2d9063b
Add Device (Mobile) and OS Version Resource Semantic Attributes
Sherlouk 9dcb9ca
Update CHANGELOG.md
Sherlouk f3cc345
Separate `model.name` and `model.identifier`, add GDPR notice
Sherlouk e27ec63
Updated Device ID note
Sherlouk 594f034
Merge branch 'main' into resource-device-conventions
carlosalberto dc7e3fb
Update CHANGELOG.md
Sherlouk 66cbe4c
Merge branch 'main' into resource-device-conventions
carlosalberto File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
groups: | ||
- id: device | ||
prefix: device | ||
brief: > | ||
The device on which the process represented by this resource is running. | ||
attributes: | ||
- id: id | ||
type: string | ||
brief: 'A unique identifier representing the device' | ||
note: > | ||
The device identifier MUST only be defined using the values outlined below. This value is not an advertising | ||
identifier and MUST NOT be used as such. | ||
On iOS (Swift or Objective-C), this value MUST be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). | ||
On Android (Java or Kotlin), this value MUST be equal to the Firebase Installation ID or a globally unique | ||
UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) | ||
on best practices and exact implementation details. | ||
Caution should be taken when storing personal data or anything which can identify a user. GDPR and | ||
data protection laws may apply, ensure you do your own due diligence. | ||
examples: ['2ab2916d-a51f-4ac8-80ee-45ac31a28092'] | ||
- id: model.identifier | ||
type: string | ||
brief: 'The model identifier for the device' | ||
note: > | ||
It's recommended this value represents a machine readable version of | ||
the model identifier rather than the market or consumer-friendly name | ||
of the device. | ||
examples: ['iPhone3,4', 'SM-G920F'] | ||
- id: model.name | ||
type: string | ||
brief: 'The marketing name for the device model' | ||
note: > | ||
It's recommended this value represents a human readable version of the | ||
device model rather than a machine readable alternative. | ||
examples: ['iPhone 6s Plus', 'Samsung Galaxy S6'] | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Device | ||
|
||
**Status**: [Experimental](../../document-status.md) | ||
|
||
**type:** `device` | ||
|
||
**Description**: The device on which the process represented by this resource is running. | ||
|
||
<!-- semconv device --> | ||
| Attribute | Type | Description | Examples | Required | | ||
|---|---|---|---|---| | ||
| `device.id` | string | A unique identifier representing the device [1] | `2ab2916d-a51f-4ac8-80ee-45ac31a28092` | No | | ||
| `device.model.identifier` | string | The model identifier for the device [2] | `iPhone3,4`; `SM-G920F` | No | | ||
| `device.model.name` | string | The marketing name for the device model [3] | `iPhone 6s Plus`; `Samsung Galaxy S6` | No | | ||
|
||
**[1]:** The device identifier MUST only be defined using the values outlined below. This value is not an advertising identifier and MUST NOT be used as such. On iOS (Swift or Objective-C), this value MUST be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android (Java or Kotlin), this value MUST be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence. | ||
|
||
**[2]:** It's recommended this value represents a machine readable version of the model identifier rather than the market or consumer-friendly name of the device. | ||
|
||
**[3]:** It's recommended this value represents a human readable version of the device model rather than a machine readable alternative. | ||
<!-- endsemconv --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to confirm, are there APIs available on iOS and Android to provide the identifier and the name? If only one can be provided and the other would require a map of sort, there wouldn't be a need to include it in telemetry I guess
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It all depends on the platform and application. The device name is unlikely (but not impossible) to be specified for iOS since it's difficult to maintain, but other platforms may make this a lot easier. The inverse can also be true. Both have their purpose, in my opinion.