getsentry / getsentry/sentry-java

Configurable maxReplayDuration for Android Session Replay

Aperta
#5,958 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Android Feature Platform: Java Replays
Lingua principale
Kotlin
Stelle
1.4k
Fork
478
Merge medio
2g 23h
PR unite (30g)
67

Descrizione

### 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
})

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
android, kotlin
Ambito
mobile
Tipo di issue
Funzionalità
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
68/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.