device_attributes.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * Copyright The OpenTelemetry Authors
  3. * SPDX-License-Identifier: Apache-2.0
  4. */
  5. /*
  6. * DO NOT EDIT, this is an Auto-generated file from:
  7. * buildscripts/semantic-convention/templates/registry/semantic_attributes-h.j2
  8. */
  9. #pragma once
  10. #include "opentelemetry/common/macros.h"
  11. #include "opentelemetry/version.h"
  12. OPENTELEMETRY_BEGIN_NAMESPACE
  13. namespace semconv
  14. {
  15. namespace device
  16. {
  17. /**
  18. A unique identifier representing the device
  19. <p>
  20. Its value SHOULD be identical for all apps on a device and it SHOULD NOT change if an app is
  21. uninstalled and re-installed. However, it might be resettable by the user for all apps on a
  22. device. Hardware IDs (e.g. vendor-specific serial number, IMEI or MAC address) MAY be used as
  23. values. <p> More information about Android identifier best practices can be found <a
  24. href="https://developer.android.com/training/articles/user-data-ids">here</a>. <blockquote>
  25. [!WARNING]
  26. <p>
  27. This attribute may contain sensitive (PII) information. Caution should be taken when storing
  28. personal data or anything which can identify a user. GDPR and data protection laws may apply,
  29. ensure you do your own due diligence.
  30. <p>
  31. Due to these reasons, this identifier is not recommended for consumer applications and will likely
  32. result in rejection from both Google Play and App Store. However, it may be appropriate for
  33. specific enterprise scenarios, such as kiosk devices or enterprise-managed devices, with
  34. appropriate compliance clearance. Any instrumentation providing this identifier MUST implement it
  35. as an opt-in feature. <p> See <a href="/docs/registry/attributes/app.md#app-installation-id">@code
  36. app.installation.id @endcode</a> for a more privacy-preserving alternative.</blockquote>
  37. */
  38. static constexpr const char *kDeviceId = "device.id";
  39. /**
  40. The name of the device manufacturer
  41. <p>
  42. The Android OS provides this field via <a
  43. href="https://developer.android.com/reference/android/os/Build#MANUFACTURER">Build</a>. iOS apps
  44. SHOULD hardcode the value @code Apple @endcode.
  45. */
  46. static constexpr const char *kDeviceManufacturer = "device.manufacturer";
  47. /**
  48. The model identifier for the device
  49. <p>
  50. It's recommended this value represents a machine-readable version of the model identifier rather
  51. than the market or consumer-friendly name of the device.
  52. */
  53. static constexpr const char *kDeviceModelIdentifier = "device.model.identifier";
  54. /**
  55. The marketing name for the device model
  56. <p>
  57. It's recommended this value represents a human-readable version of the device model rather than a
  58. machine-readable alternative.
  59. */
  60. static constexpr const char *kDeviceModelName = "device.model.name";
  61. } // namespace device
  62. } // namespace semconv
  63. OPENTELEMETRY_END_NAMESPACE