Open
Description
The experimental semconv app.installation.id
got accepted recently (open-telemetry/semantic-conventions#1897), I think it would be a useful addition to the existing attributes provided by the SDK.
What makes its implementation a bit tricky, is that there are multiple ways you can implement this resource attribute on Android. In the specs we have listed these four options:
- Firebase Installation ID.
- A globally unique UUID which is persisted across sessions in your application.
- App set ID.
Settings.getString(Settings.Secure.ANDROID_ID)
.
As @bidetofevil pointed out the most practical choice for this SDK is probably number two (UUID), however, I could imaging exposing a setter for each of the options, as they all have pros and cons.
OpenTelemetryRum.builder(this, config)
.appInstallationIdProvider(UuidAppInstallationIdProvider()) // default behavior, if nothing is specified
// or
.appInstallationIdProvider(FirebaseAppInstallationIdProvider())
// or
.appInstallationIdProvider(AppSetIdAppInstallationIdProvider())
// or
.appInstallationIdProvider(AndroidIdAppInstallationIdProvider())
// or
.appInstallationIdProvider(object : AppInstallationIdProvider() { ... })
// ...
Metadata
Metadata
Assignees
Labels
No labels