Allow us to call `setUserInfo` without completely wiping all previously set properties set by `addUserProperties`
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start with the linked implementation in dd-sdk-android-core/src/main/kotlin/com/datadog/android/core/internal/user/DatadogUserInfoProvider.kt, especially the lines that clear existing attributes. Trace how setUserInfo and addUserProperties interact, then verify that setting user identity no longer removes previously added properties; the issue’s requested behavior should be covered by regression tests.
Written by the indexing model from the issue text.
Description
Feature description
My use case is that I have independent sources for where some of my attributes come, and where my ID comes from. Whenever each one of those change, I used to call Datadog.getInstance().addUserProperties().
Now I wanted to start using setUserInfo to set my ID, only to realize that this then simply clears (here) the previously set attributes.
Proposed solution
I would need one of the two options:
- Provide a way to grab the existing attributes, so that I can grab them, and then call
setUserProperties(id, ..., grabbedAttributes)to set the ID and re-set the attributes too - Provide a way for me to set the user info without clearing the extra properties as a hidden side-effect
Other relevant information
No response
- Dominant language
- Kotlin
- Stars
- 226
- Forks
- 86
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 65
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DataDog/dd-sdk-android
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
DataDog/dd-sdk-android#3904 · 1 comment ·
Maintainers usually reply within 1 day
-
question
Difficulty 4/5 3-5 days Newbie friendliness 45/100
DataDog/dd-sdk-android#3888 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 32/100
DataDog/dd-sdk-android#3223 · 4 comments · 2 reactions ·
Maintainers usually reply within 1 day
-
automatically closed question stale
Difficulty 5/5 Over a week Newbie friendliness 25/100
DataDog/dd-sdk-android#2970 · 6 comments ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 38/100
DataDog/dd-sdk-android#2700 · 1 comment ·
Maintainers usually reply within 1 day
All issues in DataDog/dd-sdk-android
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Source is down
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
keiyoushi/extensions-source#19491 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100