Skip to content

Commit 8df9c50

Browse files
committed
Merge branch 'feature/v3' into tvaleev/feature/RUM-9899_2
# Conflicts: # sample/kotlin/src/main/kotlin/com/datadog/android/sample/user/UserFragment.kt
2 parents 99a684b + 207affa commit 8df9c50

File tree

79 files changed

+3128
-839
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+3128
-839
lines changed

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
# 2.24.0 / 2025-07-16
2+
3+
* [FEATURE] Add Clear User Info API. See [#2768](https://github.com/DataDog/dd-sdk-android/pull/2768)
4+
* [BUGFIX] Shallow copy node wireframes before iterating in `NodeFlattener`. See [#2736](https://github.com/DataDog/dd-sdk-android/pull/2736)
5+
* [BUGFIX] Fix Session Replay NPE when getting `TextView` padding. See [#2784](https://github.com/DataDog/dd-sdk-android/pull/2784)
6+
* [IMPROVEMENT] Stop posting recorded data item from main thread. See [#2763](https://github.com/DataDog/dd-sdk-android/pull/2763)
7+
* [IMPROVEMENT] Stop telemetry for Compose `CheckBox` and `RadioButton`. See [#2775](https://github.com/DataDog/dd-sdk-android/pull/2775)
8+
* [IMPROVEMENT] Introduce `_RumInternalProxy.setRumSessionTypeOverride`. See [#2776](https://github.com/DataDog/dd-sdk-android/pull/2776)
9+
* [IMPROVEMENT] Add `updateExternalRefreshRate` to internal RUM API. See [#2772](https://github.com/DataDog/dd-sdk-android/pull/2772)
10+
* [MAINTENANCE] Next dev iteration. See [#2752](https://github.com/DataDog/dd-sdk-android/pull/2752)
11+
* [MAINTENANCE] Merge `release/2.23.0` branch into `develop` branch. See [#2755](https://github.com/DataDog/dd-sdk-android/pull/2755)
12+
* [MAINTENANCE] Remove non-existent Gitlab file reference. See [#2753](https://github.com/DataDog/dd-sdk-android/pull/2753)
13+
* [MAINTENANCE] Remove workaround when checking `dd-sdk-android-benchmark-internal` is published. See [#2758](https://github.com/DataDog/dd-sdk-android/pull/2758)
14+
* [MAINTENANCE] Add `DDOCTOSTS_ID_TOKEN` to `dogfood-app` and `dogfood-demo`. See [#2757](https://github.com/DataDog/dd-sdk-android/pull/2757)
15+
* [MAINTENANCE] Update `CONTRIBUTING` doc with missing modules. See [#2762](https://github.com/DataDog/dd-sdk-android/pull/2762)
16+
* [MAINTENANCE] Update base Docker image to `Jammy`. See [#2761](https://github.com/DataDog/dd-sdk-android/pull/2761)
17+
* [MAINTENANCE] Update docker image used in `ci-image` job. See [#2764](https://github.com/DataDog/dd-sdk-android/pull/2764)
18+
* [MAINTENANCE] Use Datadog Gradle Plugin version 1.18.0. See [#2769](https://github.com/DataDog/dd-sdk-android/pull/2769)
19+
* [MAINTENANCE] Migrate publishing from OSSRH to Central Publisher portal. See [#2770](https://github.com/DataDog/dd-sdk-android/pull/2770)
20+
* [MAINTENANCE] Close Sonatype staging repo after publishing. See [#2774](https://github.com/DataDog/dd-sdk-android/pull/2774)
21+
* [MAINTENANCE] Run unit tests from samples folder and for `tools:benchmark` module. See [#2777](https://github.com/DataDog/dd-sdk-android/pull/2777)
22+
* [MAINTENANCE] Update `gradle-dependency-license` plugin to version 0.4.0. See [#2788](https://github.com/DataDog/dd-sdk-android/pull/2788)
23+
124
# 2.23.0 / 2025-06-23
225

326
* [FEATURE] Global: Add public APIs for set account information. See [#2694](https://github.com/DataDog/dd-sdk-android/pull/2694)

build.gradle.kts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ allprojects {
4949
nexusPublishing {
5050
this.repositories {
5151
sonatype {
52+
stagingProfileId = "378eecbbe2cf9"
5253
val sonatypeUsername = System.getenv("CENTRAL_PUBLISHER_USERNAME")
5354
val sonatypePassword = System.getenv("CENTRAL_PUBLISHER_PASSWORD")
5455
if (sonatypeUsername != null) username.set(sonatypeUsername)
@@ -94,6 +95,11 @@ registerSubModuleAggregationTask(
9495
":features:"
9596
)
9697
registerSubModuleAggregationTask("unitTestDebugIntegrations", "testDebugUnitTest", ":integrations:")
98+
tasks.register("unitTestDebugSamples") {
99+
dependsOn(
100+
":sample:benchmark:testDebugUnitTest"
101+
)
102+
}
97103

98104
tasks.register("assembleSampleRelease") {
99105
dependsOn(
@@ -110,7 +116,8 @@ tasks.register("unitTestTools") {
110116
":tools:unit:testJvmReleaseUnitTest",
111117
":tools:detekt:test",
112118
":tools:lint:test",
113-
":tools:noopfactory:test"
119+
":tools:noopfactory:test",
120+
":tools:benchmark:test"
114121
)
115122
}
116123

buildSrc/src/main/kotlin/com/datadog/gradle/config/AndroidConfig.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ object AndroidConfig {
2121
const val MIN_SDK_FOR_AUTO = 29
2222
const val BUILD_TOOLS_VERSION = "36.0.0"
2323

24-
val VERSION = Version(2, 24, 0, Version.Type.Snapshot)
24+
val VERSION = Version(2, 25, 0, Version.Type.Snapshot)
2525
}
2626

2727
// TODO RUM-628 Switch to Java 17 bytecode

ci/pipelines/default-pipeline.yml

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ test:debug:
147147
- GRADLE_OPTS="-Xmx3072m" DD_TAGS="test.configuration.variant:debug" ./gradlew :dd-sdk-android-internal:testDebugUnitTest --no-daemon --build-cache --gradle-user-home cache/ -Dorg.gradle.jvmargs=-javaagent:$DD_TRACER_FOLDER/dd-java-agent.jar=$DD_COMMON_AGENT_CONFIG
148148
- GRADLE_OPTS="-Xmx3072m" DD_TAGS="test.configuration.variant:debug" ./gradlew :unitTestDebugFeatures --no-daemon --build-cache --gradle-user-home cache/ -Dorg.gradle.jvmargs=-javaagent:$DD_TRACER_FOLDER/dd-java-agent.jar=$DD_COMMON_AGENT_CONFIG
149149
- GRADLE_OPTS="-Xmx3072m" DD_TAGS="test.configuration.variant:debug" ./gradlew :unitTestDebugIntegrations --no-daemon --build-cache --gradle-user-home cache/ -Dorg.gradle.jvmargs=-javaagent:$DD_TRACER_FOLDER/dd-java-agent.jar=$DD_COMMON_AGENT_CONFIG
150+
- GRADLE_OPTS="-Xmx3072m" DD_TAGS="test.configuration.variant:debug" ./gradlew :unitTestDebugSamples --no-daemon --build-cache --gradle-user-home cache/ -Dorg.gradle.jvmargs=-javaagent:$DD_TRACER_FOLDER/dd-java-agent.jar=$DD_COMMON_AGENT_CONFIG
150151
artifacts:
151152
when: always
152153
expire_in: 1 week
@@ -500,7 +501,7 @@ publish:release-core:
500501
timeout: 30m
501502
script:
502503
- !reference [.snippets, set-publishing-credentials]
503-
- ./gradlew :dd-sdk-android-core:publishToSonatype --stacktrace --no-daemon
504+
- ./gradlew :dd-sdk-android-core:publishToSonatype closeSonatypeStagingRepository --stacktrace --no-daemon
504505
artifacts:
505506
when: on_success
506507
expire_in: 7 days
@@ -517,7 +518,7 @@ publish:release-internal:
517518
timeout: 30m
518519
script:
519520
- !reference [ .snippets, set-publishing-credentials ]
520-
- ./gradlew :dd-sdk-android-internal:publishToSonatype --stacktrace --no-daemon
521+
- ./gradlew :dd-sdk-android-internal:publishToSonatype closeSonatypeStagingRepository --stacktrace --no-daemon
521522
artifacts:
522523
when: on_success
523524
expire_in: 7 days
@@ -553,7 +554,7 @@ publish:release-trace:
553554
timeout: 30m
554555
script:
555556
- !reference [.snippets, set-publishing-credentials]
556-
- ./gradlew :features:dd-sdk-android-trace:publishToSonatype --stacktrace --no-daemon
557+
- ./gradlew :features:dd-sdk-android-trace:publishToSonatype closeSonatypeStagingRepository --stacktrace --no-daemon
557558
artifacts:
558559
when: on_success
559560
expire_in: 7 days
@@ -570,7 +571,7 @@ publish:release-trace-otel:
570571
timeout: 30m
571572
script:
572573
- !reference [.snippets, set-publishing-credentials]
573-
- ./gradlew :features:dd-sdk-android-trace-otel:publishToSonatype --stacktrace --no-daemon
574+
- ./gradlew :features:dd-sdk-android-trace-otel:publishToSonatype closeSonatypeStagingRepository --stacktrace --no-daemon
574575
artifacts:
575576
when: on_success
576577
expire_in: 7 days
@@ -587,7 +588,7 @@ publish:release-logs:
587588
timeout: 30m
588589
script:
589590
- !reference [.snippets, set-publishing-credentials]
590-
- ./gradlew :features:dd-sdk-android-logs:publishToSonatype --stacktrace --no-daemon
591+
- ./gradlew :features:dd-sdk-android-logs:publishToSonatype closeSonatypeStagingRepository --stacktrace --no-daemon
591592
artifacts:
592593
when: on_success
593594
expire_in: 7 days
@@ -604,7 +605,7 @@ publish:release-rum:
604605
timeout: 30m
605606
script:
606607
- !reference [.snippets, set-publishing-credentials]
607-
- ./gradlew :features:dd-sdk-android-rum:publishToSonatype --stacktrace --no-daemon
608+
- ./gradlew :features:dd-sdk-android-rum:publishToSonatype closeSonatypeStagingRepository --stacktrace --no-daemon
608609
artifacts:
609610
when: on_success
610611
expire_in: 7 days
@@ -621,7 +622,7 @@ publish:release-ndk:
621622
timeout: 30m
622623
script:
623624
- !reference [.snippets, set-publishing-credentials]
624-
- ./gradlew :features:dd-sdk-android-ndk:publishToSonatype --stacktrace --no-daemon
625+
- ./gradlew :features:dd-sdk-android-ndk:publishToSonatype closeSonatypeStagingRepository --stacktrace --no-daemon
625626
artifacts:
626627
when: on_success
627628
expire_in: 7 days
@@ -638,7 +639,7 @@ publish:release-session-replay:
638639
timeout: 30m
639640
script:
640641
- !reference [.snippets, set-publishing-credentials]
641-
- ./gradlew :features:dd-sdk-android-session-replay:publishToSonatype --stacktrace --no-daemon
642+
- ./gradlew :features:dd-sdk-android-session-replay:publishToSonatype closeSonatypeStagingRepository --stacktrace --no-daemon
642643
artifacts:
643644
when: on_success
644645
expire_in: 7 days
@@ -655,7 +656,7 @@ publish:release-session-replay-material:
655656
timeout: 30m
656657
script:
657658
- !reference [.snippets, set-publishing-credentials]
658-
- ./gradlew :features:dd-sdk-android-session-replay-material:publishToSonatype --stacktrace --no-daemon
659+
- ./gradlew :features:dd-sdk-android-session-replay-material:publishToSonatype closeSonatypeStagingRepository --stacktrace --no-daemon
659660
artifacts:
660661
when: on_success
661662
expire_in: 7 days
@@ -672,7 +673,7 @@ publish:release-session-replay-compose:
672673
timeout: 30m
673674
script:
674675
- !reference [.snippets, set-publishing-credentials]
675-
- ./gradlew :features:dd-sdk-android-session-replay-compose:publishToSonatype --stacktrace --no-daemon
676+
- ./gradlew :features:dd-sdk-android-session-replay-compose:publishToSonatype closeSonatypeStagingRepository --stacktrace --no-daemon
676677
artifacts:
677678
when: on_success
678679
expire_in: 7 days
@@ -689,7 +690,7 @@ publish:release-webview:
689690
timeout: 30m
690691
script:
691692
- !reference [.snippets, set-publishing-credentials]
692-
- ./gradlew :features:dd-sdk-android-webview:publishToSonatype --stacktrace --no-daemon
693+
- ./gradlew :features:dd-sdk-android-webview:publishToSonatype closeSonatypeStagingRepository --stacktrace --no-daemon
693694
artifacts:
694695
when: on_success
695696
expire_in: 7 days
@@ -710,7 +711,7 @@ publish:release-coil:
710711
timeout: 30m
711712
script:
712713
- !reference [.snippets, set-publishing-credentials]
713-
- ./gradlew :integrations:dd-sdk-android-coil:publishToSonatype --stacktrace --no-daemon
714+
- ./gradlew :integrations:dd-sdk-android-coil:publishToSonatype closeSonatypeStagingRepository --stacktrace --no-daemon
714715
artifacts:
715716
when: on_success
716717
expire_in: 7 days
@@ -727,7 +728,7 @@ publish:release-compose:
727728
timeout: 30m
728729
script:
729730
- !reference [.snippets, set-publishing-credentials]
730-
- ./gradlew :integrations:dd-sdk-android-compose:publishToSonatype --stacktrace --no-daemon
731+
- ./gradlew :integrations:dd-sdk-android-compose:publishToSonatype closeSonatypeStagingRepository --stacktrace --no-daemon
731732
artifacts:
732733
when: on_success
733734
expire_in: 7 days
@@ -744,7 +745,7 @@ publish:release-fresco:
744745
timeout: 30m
745746
script:
746747
- !reference [.snippets, set-publishing-credentials]
747-
- ./gradlew :integrations:dd-sdk-android-fresco:publishToSonatype --stacktrace --no-daemon
748+
- ./gradlew :integrations:dd-sdk-android-fresco:publishToSonatype closeSonatypeStagingRepository --stacktrace --no-daemon
748749
artifacts:
749750
when: on_success
750751
expire_in: 7 days
@@ -761,7 +762,7 @@ publish:release-glide:
761762
timeout: 30m
762763
script:
763764
- !reference [.snippets, set-publishing-credentials]
764-
- ./gradlew :integrations:dd-sdk-android-glide:publishToSonatype --stacktrace --no-daemon
765+
- ./gradlew :integrations:dd-sdk-android-glide:publishToSonatype closeSonatypeStagingRepository --stacktrace --no-daemon
765766
artifacts:
766767
when: on_success
767768
expire_in: 7 days
@@ -778,7 +779,7 @@ publish:release-trace-coroutines:
778779
timeout: 30m
779780
script:
780781
- !reference [.snippets, set-publishing-credentials]
781-
- ./gradlew :integrations:dd-sdk-android-trace-coroutines:publishToSonatype --stacktrace --no-daemon
782+
- ./gradlew :integrations:dd-sdk-android-trace-coroutines:publishToSonatype closeSonatypeStagingRepository --stacktrace --no-daemon
782783
artifacts:
783784
when: on_success
784785
expire_in: 7 days
@@ -795,7 +796,7 @@ publish:release-rum-coroutines:
795796
timeout: 30m
796797
script:
797798
- !reference [.snippets, set-publishing-credentials]
798-
- ./gradlew :integrations:dd-sdk-android-rum-coroutines:publishToSonatype --stacktrace --no-daemon
799+
- ./gradlew :integrations:dd-sdk-android-rum-coroutines:publishToSonatype closeSonatypeStagingRepository --stacktrace --no-daemon
799800
artifacts:
800801
when: on_success
801802
expire_in: 7 days
@@ -812,7 +813,7 @@ publish:release-rx:
812813
timeout: 30m
813814
script:
814815
- !reference [.snippets, set-publishing-credentials]
815-
- ./gradlew :integrations:dd-sdk-android-rx:publishToSonatype --stacktrace --no-daemon
816+
- ./gradlew :integrations:dd-sdk-android-rx:publishToSonatype closeSonatypeStagingRepository --stacktrace --no-daemon
816817
artifacts:
817818
when: on_success
818819
expire_in: 7 days
@@ -829,7 +830,7 @@ publish:release-sqldelight:
829830
timeout: 30m
830831
script:
831832
- !reference [.snippets, set-publishing-credentials]
832-
- ./gradlew :integrations:dd-sdk-android-sqldelight:publishToSonatype --stacktrace --no-daemon
833+
- ./gradlew :integrations:dd-sdk-android-sqldelight:publishToSonatype closeSonatypeStagingRepository --stacktrace --no-daemon
833834
artifacts:
834835
when: on_success
835836
expire_in: 7 days
@@ -846,7 +847,7 @@ publish:release-timber:
846847
timeout: 30m
847848
script:
848849
- !reference [.snippets, set-publishing-credentials]
849-
- ./gradlew :integrations:dd-sdk-android-timber:publishToSonatype --stacktrace --no-daemon
850+
- ./gradlew :integrations:dd-sdk-android-timber:publishToSonatype closeSonatypeStagingRepository --stacktrace --no-daemon
850851
artifacts:
851852
when: on_success
852853
expire_in: 7 days
@@ -863,7 +864,7 @@ publish:release-android-tv:
863864
timeout: 30m
864865
script:
865866
- !reference [.snippets, set-publishing-credentials]
866-
- ./gradlew :integrations:dd-sdk-android-tv:publishToSonatype --stacktrace --no-daemon
867+
- ./gradlew :integrations:dd-sdk-android-tv:publishToSonatype closeSonatypeStagingRepository --stacktrace --no-daemon
867868
artifacts:
868869
when: on_success
869870
expire_in: 7 days
@@ -880,7 +881,7 @@ publish:release-okhttp:
880881
timeout: 30m
881882
script:
882883
- !reference [.snippets, set-publishing-credentials]
883-
- ./gradlew :integrations:dd-sdk-android-okhttp:publishToSonatype --stacktrace --no-daemon
884+
- ./gradlew :integrations:dd-sdk-android-okhttp:publishToSonatype closeSonatypeStagingRepository --stacktrace --no-daemon
884885
artifacts:
885886
when: on_success
886887
expire_in: 7 days
@@ -897,7 +898,7 @@ publish:release-okhttp-otel:
897898
timeout: 30m
898899
script:
899900
- !reference [.snippets, set-publishing-credentials]
900-
- ./gradlew :integrations:dd-sdk-android-okhttp-otel:publishToSonatype --stacktrace --no-daemon
901+
- ./gradlew :integrations:dd-sdk-android-okhttp-otel:publishToSonatype closeSonatypeStagingRepository --stacktrace --no-daemon
901902
artifacts:
902903
when: on_success
903904
expire_in: 7 days
@@ -916,7 +917,7 @@ publish:release-benchmark:
916917
timeout: 30m
917918
script:
918919
- !reference [.snippets, set-publishing-credentials]
919-
- ./gradlew :tools:benchmark:publishToSonatype --stacktrace --no-daemon
920+
- ./gradlew :tools:benchmark:publishToSonatype closeSonatypeStagingRepository --stacktrace --no-daemon
920921
artifacts:
921922
when: on_success
922923
expire_in: 7 days

dd-sdk-android-core/api/apiSurface

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ object com.datadog.android.Datadog
99
fun setTrackingConsent(com.datadog.android.privacy.TrackingConsent, com.datadog.android.api.SdkCore = getInstance())
1010
fun setUserInfo(String, String? = null, String? = null, Map<String, Any?> = emptyMap(), com.datadog.android.api.SdkCore = getInstance())
1111
fun addUserProperties(Map<String, Any?>, com.datadog.android.api.SdkCore = getInstance())
12+
fun clearUserInfo(com.datadog.android.api.SdkCore = getInstance())
1213
fun clearAllData(com.datadog.android.api.SdkCore = getInstance())
1314
fun setAccountInfo(String, String? = null, Map<String, Any?> = emptyMap(), com.datadog.android.api.SdkCore = getInstance())
1415
fun addAccountExtraInfo(Map<String, Any?>, com.datadog.android.api.SdkCore = getInstance())
@@ -59,6 +60,7 @@ interface com.datadog.android.api.SdkCore
5960
fun setTrackingConsent(com.datadog.android.privacy.TrackingConsent)
6061
fun setUserInfo(String, String? = null, String? = null, Map<String, Any?> = emptyMap())
6162
fun addUserProperties(Map<String, Any?>)
63+
fun clearUserInfo()
6264
fun clearAllData()
6365
fun setAccountInfo(String, String? = null, Map<String, Any?> = emptyMap())
6466
fun addAccountExtraInfo(Map<String, Any?>)

dd-sdk-android-core/api/dd-sdk-android-core.api

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ public final class com/datadog/android/Datadog {
2424
public static final fun clearAllData ()V
2525
public static final fun clearAllData (Lcom/datadog/android/api/SdkCore;)V
2626
public static synthetic fun clearAllData$default (Lcom/datadog/android/api/SdkCore;ILjava/lang/Object;)V
27+
public static final fun clearUserInfo ()V
28+
public static final fun clearUserInfo (Lcom/datadog/android/api/SdkCore;)V
29+
public static synthetic fun clearUserInfo$default (Lcom/datadog/android/api/SdkCore;ILjava/lang/Object;)V
2730
public static final fun getInstance ()Lcom/datadog/android/api/SdkCore;
2831
public static final fun getInstance (Ljava/lang/String;)Lcom/datadog/android/api/SdkCore;
2932
public static synthetic fun getInstance$default (Ljava/lang/String;ILjava/lang/Object;)Lcom/datadog/android/api/SdkCore;
@@ -127,6 +130,7 @@ public abstract interface class com/datadog/android/api/SdkCore {
127130
public abstract fun addUserProperties (Ljava/util/Map;)V
128131
public abstract fun clearAccountInfo ()V
129132
public abstract fun clearAllData ()V
133+
public abstract fun clearUserInfo ()V
130134
public abstract fun getName ()Ljava/lang/String;
131135
public abstract fun getService ()Ljava/lang/String;
132136
public abstract fun getTime ()Lcom/datadog/android/api/context/TimeInfo;

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,32 @@ object Datadog {
279279
sdkCore.addUserProperties(extraInfo)
280280
}
281281

282+
/**
283+
* Clear the current user information.
284+
*
285+
* User information will be set to null.
286+
* After calling this api, Logs, Traces, RUM Events will not include the user information anymore.
287+
*
288+
* Any active RUM Session, active RUM View at the time of call will have their `usr` attribute cleared.
289+
*
290+
* If you want to retain the current `usr` on the active RUM session,
291+
* you need to stop the session first by using `GlobalRumMonitor.get().stopSession()`
292+
*
293+
* If you want to retain the current `usr` on the active RUM views,
294+
* you need to stop the view first by using `GlobalRumMonitor.get().stopView()`.
295+
*
296+
* @param sdkCore SDK instance to clear user info. If not provided,
297+
* default SDK instance will be used.
298+
*/
299+
@JvmStatic
300+
@JvmOverloads
301+
@AnyThread
302+
fun clearUserInfo(
303+
sdkCore: SdkCore = getInstance()
304+
) {
305+
sdkCore.clearUserInfo()
306+
}
307+
282308
/**
283309
* Clears all unsent data in all registered features.
284310
*

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,23 @@ interface SdkCore {
7676
@AnyThread
7777
fun addUserProperties(extraInfo: Map<String, Any?>)
7878

79+
/**
80+
* Clear the current user information.
81+
*
82+
* User information will be set to null.
83+
* After calling this api, Logs, Traces, RUM Events will not include the user information anymore.
84+
*
85+
* Any active RUM Session, active RUM View at the time of call will have their `usr` attribute cleared.
86+
*
87+
* If you want to retain the current `usr` on the active RUM session,
88+
* you need to stop the session first by using `GlobalRumMonitor.get().stopSession()`
89+
*
90+
* If you want to retain the current `usr` on the active RUM views,
91+
* you need to stop the view first by using `GlobalRumMonitor.get().stopView()`
92+
*/
93+
@AnyThread
94+
fun clearUserInfo()
95+
7996
/**
8097
* Clears all unsent data in all registered features.
8198
*/

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,12 @@ internal class DatadogCore(
178178
}
179179
}
180180

181+
/** @inheritDoc */
182+
@AnyThread
183+
override fun clearUserInfo() {
184+
coreFeature.userInfoProvider.clearUserInfo()
185+
}
186+
181187
/** @inheritDoc */
182188
@AnyThread
183189
override fun clearAllData() {

0 commit comments

Comments
 (0)