getsentry / getsentry/sentry-java

Configurable maxReplayDuration for Android Session Replay

未关闭
#5,958 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Android Feature Platform: Java Replays
主要语言
Kotlin
星标
1.4k
派生
478
平均合并
2 天 23 小时
30 天内合并 PR
67

描述

### Problem Statement

The Android Session Replay SDK currently has a fixed maximum session duration of 60 minutes with no way to configure a lower limit. The JavaScript SDK already supports a maxReplayDuration option, but no equivalent exists for Android.

Use cases where a configurable max duration would be helpful:

Reducing storage/resource usage by capping replays at a shorter duration (e.g. 15 or 30 minutes)
Limiting post-error recording to a shorter window when using onErrorSampleRate
Aligning Android replay behavior with the JavaScript SDK for consistency

### Solution Brainstorm

Add a maxReplayDuration option to SessionReplayOptions, similar to what is already available in the JavaScript SDK:

SentryAndroid.init(context) { options ->
options.sessionReplay.maxReplayDuration = 30 * 60 * 1000L // 30 minutes in ms
}
This would mirror the existing JavaScript SDK option:

replayIntegration({
maxReplayDuration: 30 * 60 * 1000, // 30 minutes in ms
})

贡献指南

打开贡献指南

调研方向

Start with SessionReplayOptions and the Android Session Replay initialization shown through SentryAndroid.init; compare the existing JavaScript maxReplayDuration behavior. Trace where the fixed 60-minute limit is applied, then verify that configuring a lower duration works without changing the default behavior and run the relevant Android tests.

由索引模型根据 Issue 内容生成。

评估

技术栈
android, kotlin
领域
mobile
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
68/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。