Skip to content

Commit

Permalink
RUM-8673 Update setUserInfo API to make id mandatory
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejburda committed Feb 20, 2025
1 parent fe2a4ca commit 1ca7342
Showing 1 changed file with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ object Datadog {
/**
* Sets the user information.
*
* @param id (nullable) a unique user identifier (relevant to your business domain)
* @param id a unique user identifier (relevant to your business domain)
* @param name (nullable) the user name or alias
* @param email (nullable) the user email
* @param extraInfo additional information. An extra information can be
Expand All @@ -249,6 +249,22 @@ object Datadog {
*/
@JvmStatic
@JvmOverloads
fun setUserInfo(
id: String,
name: String? = null,
email: String? = null,
extraInfo: Map<String, Any?> = emptyMap(),
sdkCore: SdkCore = getInstance()
) {
sdkCore.setUserInfo(id, name, email, extraInfo)
}

@JvmStatic
@JvmOverloads
@Deprecated(
"UserInfo id property is now mandatory.",
ReplaceWith("setUserInfo(id!!, name, email, extraInfo, sdkCore)")
)
fun setUserInfo(
id: String? = null,
name: String? = null,
Expand Down

0 comments on commit 1ca7342

Please sign in to comment.