Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow client SDK to provide a custom version number #1550

Open
ankushg opened this issue Jul 19, 2023 · 3 comments
Open

Allow client SDK to provide a custom version number #1550

ankushg opened this issue Jul 19, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@ankushg
Copy link

ankushg commented Jul 19, 2023

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.

@ankushg ankushg added the enhancement New feature or request label Jul 19, 2023
@xgouchet
Copy link
Collaborator

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

@ankushg
Copy link
Author

ankushg commented Jul 20, 2023

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?

@xgouchet
Copy link
Collaborator

xgouchet commented Jul 21, 2023

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"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants