-
Notifications
You must be signed in to change notification settings - Fork 63
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
ISSUE-950 | Add method to set extra properties on the UserInfo object #952
Conversation
dd-sdk-android/src/main/kotlin/com/datadog/android/log/internal/user/DatadogUserInfoProvider.kt
Outdated
Show resolved
Hide resolved
...android/src/test/kotlin/com/datadog/android/log/internal/user/DatadogUserInfoProviderTest.kt
Outdated
Show resolved
Hide resolved
Thanks a lot for this PR, I added a few comments to ensure consistency with our guidelines and existing APIs |
feedback should be addressed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few nit picks regarding property based testing. Also can you make sure that the static analysis pass locally:
./gradlew clean detektAll ktlintCheckAll lintCheckAll
dd-sdk-android/src/test/kotlin/com/datadog/android/utils/forge/Configurator.kt
Outdated
Show resolved
Hide resolved
dd-sdk-android/src/test/kotlin/com/datadog/android/utils/forge/Configurator.kt
Outdated
Show resolved
Hide resolved
...android/src/test/kotlin/com/datadog/android/log/internal/user/DatadogUserInfoProviderTest.kt
Outdated
Show resolved
Hide resolved
...android/src/test/kotlin/com/datadog/android/log/internal/user/DatadogUserInfoProviderTest.kt
Outdated
Show resolved
Hide resolved
dd-sdk-android/src/test/kotlin/com/datadog/android/utils/forge/StringForgeryFactory.kt
Outdated
Show resolved
Hide resolved
...id/src/test/kotlin/com/datadog/android/utils/forge/UserAdditionalPropertiesForgeryFactory.kt
Outdated
Show resolved
Hide resolved
Verified static analysis passed locally 👍 I did run into this issue though (https://issuetracker.google.com/issues/206099937) - I upgraded the AGP version to 7.2.1 locally and that worked for me (and reverted before committing) Other feedback should be addressed as well |
@xgouchet ty for merging 🙏 are you able to share when we might see this in a release for the SDK? |
What does this PR do?
Adds a method to set the additional properties on a user
issue raised here: #950
Motivation
Throughout our application, we have properties that we want to set at a point where it'd be inconvenient to also have to grab the user's name / email / id. being able to set properties on the fly for a user is a convenient method that exists in multiple other logging types of libraries / SDKs
Additional Notes
I wasn't able to get the sample project running on my M1 device (issue opened #951) - but I did add a call site to it. Please let me know if there is more documentation / usage that should be added!
Review checklist (to be filled by reviewers)