# 0034: Adding device fields - Stage: **2 (candidate)** - Date: **2022-08-16** With mobile use cases (e.g. tracing and logging on mobile devices, such as iOS, Android, etc.) it is important to capture device information that would allow to correlate and slice and dice information by device properties (such as device manufacturer, device model id, etc.). The [OpenTelemetry semantic conventions specify the following fields for devices](https://opentelemetry.io/docs/reference/specification/resource/semantic_conventions/device/): - `device.id` - `device.model.identifier` - `device.model.name` - `device.manufacturer` With this RFC, we propose to adopt the device fields specified by OpenTelemetry to support product use cases at Elastic that are related to mobile devices (e.g. APM for iOS and Android). ## Fields A new `Device` field group will be added with the fields defined by [OpenTelemetry Semantic Conventions for Devices](https://opentelemetry.io/docs/reference/specification/resource/semantic_conventions/device/). ## Usage APM data (i.e. transaction and spans that are part of end-to-end traces) is also collected for mobile devices (i.e. iOS and Android applications). Enriching this APM data would allow for rhich performance and business-related analysis of the data. E.g. user could filter performance issues, errors, crashes, etc. by device model types, versions, manufacturers. The APM correlations feature can be improved for mobile applications by including these fields as it would identify statistical correlations if problems occur, for example, only for specific device models. A unique device.id allows in addition to derive statistics on recurring users vs. new users. ## Source data The information will be retrieved by the APM agents for iOS and Android. The Android agent will use the [Build API](https://developer.android.com/reference/android/os/Build#MANUFACTURER) to retrieve the above information. For iOS, the [vendor identifier property](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor) will be used to retrieve the device ID. iOS also provides an API to retrive the `device.model.identifier`. For both, iOS and Android, the `device.model.name` cannot be retrieved on the Device itself but need to be mapped from the `device.model.identifier` value. We will use an Elasticsearch ingest node processor for this mapping ([this is the corresponding ES issue for it](https://github.com/elastic/elasticsearch/issues/88865)). ## Scope of impact ## Concerns - `device.model.name` cannot be collected directly on the device but needs to be mapped from the `device.model.identifier`. This requires backend-side mapping. We will solve this through an Elasticsearch ingest node processor (similar to the GeoIP processor that maps IPs to geo locations). ## People The following are the people that consulted on the contents of this RFC. * @AlexanderWert | author * @felixbarny | subject matter expert * @bryce-b | subject matter expert * @LikeTheSalad | subject matter expert * @akhileshpok | PM Mobile APM ## References * [OpenTelemetry specification for device](https://opentelemetry.io/docs/reference/specification/resource/semantic_conventions/device/) ### RFC Pull Requests * Stage 0: https://github.com/elastic/ecs/pull/2013 * Correction: https://github.com/elastic/ecs/pull/2021 * Stage 1: https://github.com/elastic/ecs/pull/2026 * Stage 2: https://github.com/elastic/ecs/pull/2030