|
| 1 | +# Copyright The OpenTelemetry Authors |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +from typing import Final |
| 16 | + |
| 17 | +APP_INSTALLATION_ID: Final = "app.installation.id" |
| 18 | +""" |
| 19 | +A unique identifier representing the installation of an application on a specific device. |
| 20 | +Note: Its value SHOULD persist across launches of the same application installation, including through application upgrades. |
| 21 | +It SHOULD change if the application is uninstalled or if all applications of the vendor are uninstalled. |
| 22 | +Additionally, users might be able to reset this value (e.g. by clearing application data). |
| 23 | +If an app is installed multiple times on the same device (e.g. in different accounts on Android), each `app.installation.id` SHOULD have a different value. |
| 24 | +If multiple OpenTelemetry SDKs are used within the same application, they SHOULD use the same value for `app.installation.id`. |
| 25 | +Hardware IDs (e.g. serial number, IMEI, MAC address) MUST NOT be used as the `app.installation.id`. |
| 26 | +
|
| 27 | +For iOS, this value SHOULD be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/identifierforvendor). |
| 28 | +
|
| 29 | +For Android, examples of `app.installation.id` implementations include: |
| 30 | +
|
| 31 | +- [Firebase Installation ID](https://firebase.google.com/docs/projects/manage-installations). |
| 32 | +- A globally unique UUID which is persisted across sessions in your application. |
| 33 | +- [App set ID](https://developer.android.com/identity/app-set-id). |
| 34 | +- [`Settings.getString(Settings.Secure.ANDROID_ID)`](https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID). |
| 35 | +
|
| 36 | +More information about Android identifier best practices can be found [here](https://developer.android.com/training/articles/user-data-ids). |
| 37 | +""" |
0 commit comments