File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
features/dd-sdk-android-rum/src
main/kotlin/com/datadog/android/rum/internal
test/kotlin/com/datadog/android/rum/internal Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -263,8 +263,9 @@ internal class RumFeature(
263
263
)
264
264
}
265
265
266
- override val storageConfiguration: FeatureStorageConfiguration =
267
- FeatureStorageConfiguration .DEFAULT
266
+ override val storageConfiguration: FeatureStorageConfiguration = FeatureStorageConfiguration .DEFAULT .copy(
267
+ oldBatchThreshold = RUM_TTL_24H
268
+ )
268
269
269
270
override fun onStop () {
270
271
sdkCore.removeEventReceiver(name)
@@ -639,6 +640,7 @@ internal class RumFeature(
639
640
internal const val TELEMETRY_SESSION_REPLAY_SKIP_FRAME = " sr_skipped_frame"
640
641
internal const val FLUSH_AND_STOP_MONITOR_MESSAGE_TYPE = " flush_and_stop_monitor"
641
642
643
+ internal val RUM_TTL_24H = TimeUnit .HOURS .toMillis(24 )
642
644
internal const val ALL_IN_SAMPLE_RATE : Float = 100f
643
645
internal const val DEFAULT_SAMPLE_RATE : Float = 100f
644
646
internal const val DEFAULT_TELEMETRY_SAMPLE_RATE : Float = 20f
Original file line number Diff line number Diff line change @@ -164,6 +164,15 @@ internal class RumFeatureTest {
164
164
.isInstanceOf(RumDataWriter ::class .java)
165
165
}
166
166
167
+ @Test
168
+ fun `M allow 24h storage W init()` () {
169
+ // When
170
+ val config = testedFeature.storageConfiguration
171
+
172
+ // Then
173
+ assertThat(config.oldBatchThreshold).isEqualTo(24L * 60L * 60L * 1000L )
174
+ }
175
+
167
176
@Test
168
177
fun `M store sample rate W initialize()` () {
169
178
// When
You can’t perform that action at this time.
0 commit comments