Skip to content

Allow us to call setUserInfo without completely wiping all previously set properties set by addUserProperties #2132

@StylianosGakis

Description

@StylianosGakis

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions