getsentry / getsentry/sentry-java

Configurable maxReplayDuration for Android Session Replay

Ouverte
#5,958 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Android Feature Platform: Java Replays
Langage dominant
Kotlin
Étoiles
1.4k
Forks
478
Merge moyen
2 j 23 h
PR mergées (30 j)
67

Description

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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
android, kotlin
Domaine
mobile
Type d'issue
Fonctionnalité
Difficulté
3/5
Temps estimé
1-2 jours
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
68/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.