Skip to content

Commit a10d27f

Browse files
committed
RUM-8673 Update setUserInfo API to make id mandatory
1 parent c0044da commit a10d27f

File tree

1 file changed

+17
-1
lines changed
  • dd-sdk-android-core/src/main/kotlin/com/datadog/android

1 file changed

+17
-1
lines changed

dd-sdk-android-core/src/main/kotlin/com/datadog/android/Datadog.kt

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ object Datadog {
239239
/**
240240
* Sets the user information.
241241
*
242-
* @param id (nullable) a unique user identifier (relevant to your business domain)
242+
* @param id a unique user identifier (relevant to your business domain)
243243
* @param name (nullable) the user name or alias
244244
* @param email (nullable) the user email
245245
* @param extraInfo additional information. An extra information can be
@@ -249,6 +249,22 @@ object Datadog {
249249
*/
250250
@JvmStatic
251251
@JvmOverloads
252+
fun setUserInfo(
253+
id: String,
254+
name: String? = null,
255+
email: String? = null,
256+
extraInfo: Map<String, Any?> = emptyMap(),
257+
sdkCore: SdkCore = getInstance()
258+
) {
259+
sdkCore.setUserInfo(id, name, email, extraInfo)
260+
}
261+
262+
@JvmStatic
263+
@JvmOverloads
264+
@Deprecated(
265+
"UserInfo id property is now mandatory.",
266+
ReplaceWith("setUserInfo(id!!, name, email, extraInfo, sdkCore)")
267+
)
252268
fun setUserInfo(
253269
id: String? = null,
254270
name: String? = null,

0 commit comments

Comments
 (0)