Skip to content
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

move device to the registry #497

Merged
merged 5 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/attributes-registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Currently, the following namespaces exist:
* [Code](code.md)
* [Container](container.md)
* [Destination](destination.md)
* [Device](device.md)
* [HTTP](http.md)
* [Network](network.md)
* [OCI](oci.md)
Expand Down
23 changes: 23 additions & 0 deletions docs/attributes-registry/device.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!--- Hugo front matter used to generate the website version of this page:
--->

# Device

## Device Attributes

<!-- semconv registry.device(omit_requirement_level) -->
| Attribute | Type | Description | Examples |
|---|---|---|---|
| `device.id` | string | A unique identifier representing the device [1] | `2ab2916d-a51f-4ac8-80ee-45ac31a28092` |
| `device.manufacturer` | string | The name of the device manufacturer [2] | `Apple`; `Samsung` |
| `device.model.identifier` | string | The model identifier for the device [3] | `iPhone3,4`; `SM-G920F` |
| `device.model.name` | string | The marketing name for the device model [4] | `iPhone 6s Plus`; `Samsung Galaxy S6` |

**[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]:** The Android OS provides this field via [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER). iOS apps SHOULD hardcode the value `Apple`.

**[3]:** 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.

**[4]:** It's recommended this value represents a human-readable version of the device model rather than a machine-readable alternative.
<!-- endsemconv -->
12 changes: 6 additions & 6 deletions docs/resource/device.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@
<!-- semconv device -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `device.id` | string | A unique identifier representing the device [1] | `2ab2916d-a51f-4ac8-80ee-45ac31a28092` | Recommended |
| `device.manufacturer` | string | The name of the device manufacturer [2] | `Apple`; `Samsung` | Recommended |
| `device.model.identifier` | string | The model identifier for the device [3] | `iPhone3,4`; `SM-G920F` | Recommended |
| `device.model.name` | string | The marketing name for the device model [4] | `iPhone 6s Plus`; `Samsung Galaxy S6` | Recommended |
| [`device.id`](../attributes-registry/device.md) | string | A unique identifier representing the device [1] | `2ab2916d-a51f-4ac8-80ee-45ac31a28092` | Recommended |
| [`device.manufacturer`](../attributes-registry/device.md) | string | The name of the device manufacturer [2] | `Apple`; `Samsung` | Recommended |
| [`device.model.identifier`](../attributes-registry/device.md) | string | The model identifier for the device [3] | `iPhone3,4`; `SM-G920F` | Recommended |
| [`device.model.name`](../attributes-registry/device.md) | string | The marketing name for the device model [4] | `iPhone 6s Plus`; `Samsung Galaxy S6` | Recommended |

**[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]:** The Android OS provides this field via [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER). iOS apps SHOULD hardcode the value `Apple`.

**[3]:** 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 machine-readable version of the model identifier rather than the market or consumer-friendly name of the device.

**[4]:** It's recommended this value represents a human readable version of the device model rather than a machine readable alternative.
**[4]:** It's recommended this value represents a human-readable version of the device model rather than a machine-readable alternative.
<!-- endsemconv -->

[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.26.0/specification/document-status.md
46 changes: 46 additions & 0 deletions model/registry/device.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
groups:
- id: registry.device
prefix: device
type: attribute_group
brief: >
Describes device attributes.
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: manufacturer
type: string
brief: >
The name of the device manufacturer
note: >
The Android OS provides this field via [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER).
iOS apps SHOULD hardcode the value `Apple`.
examples: ['Apple', 'Samsung']
- 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']
38 changes: 4 additions & 34 deletions model/resource/device.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,7 @@ groups:
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']
- id: manufacturer
type: string
brief: 'The name of the device manufacturer'
note: >
The Android OS provides this field via [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER). iOS apps SHOULD hardcode the value `Apple`.
examples: ['Apple', 'Samsung']
- ref: device.id
- ref: device.manufacturer
- ref: device.model.identifier
- ref: device.model.name