dd-sdk-android
dd-sdk-android copied to clipboard
Allow client SDK to provide a custom version number
Currently, the datadog SDK seems to be looking up our version number from the PackageManager: https://github.com/DataDog/dd-sdk-android/blob/4be13fb69720ba54a7d61284816fb8a91ed75d19/dd-sdk-android-core/src/main/kotlin/com/datadog/android/core/internal/CoreFeature.kt#L314C34-L314C59
We reuse the same user-visible number if we discover bugs before pushing to production, but this makes all of our datadog dashboards extremely confusing to use.
We'd like to be able to provide our version code as the datadog version, rather than the user-visible version string.
Hi @ankushg , this is a topic we're considering supporting in the future, we'll keep you posted when we have a plan for such use case
Thanks -- from the code, it looked like we should have been able to pass in an attribute called "_dd.version" and have that used instead of what the PackageManager reports
Is that accurate?
Yes indeed that workaround will work, you just need to make sure you change also the version in the gradle plugin when uploading your Proguard/R8 mapping files, with the following snippet :
datadog {
versionName = "42"
}