Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Session Replay: support custom User Feedback flows without promoting buffer mode on capture

オープン
#6,095 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
android, kotlin
領域
mobile-dev

調査の方向性

まず、flush()、pause()、stop()、startBuffering() 周辺の現在のモバイルリプレイのライフサイクルを確認します。これには、ログで言及されている Android ReplayCache.persistSegmentValues と BufferCaptureStrategy.stop のパスも含まれます。組み込みのフィードバック調整とカスタムフローの要件を比較し、API 設計を iOS と調整します。カスタムフィードバックでバッファを保持、アタッチ、または破棄でき、フォーム入力を除外し、プロモーションや連続性の破損なしにバッファリングを再開できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Android Feature Platform: Java
Problem Statement

For custom in-app User Feedback flows on mobile, there is currently no clean way to associate feedback with the pre-feedback replay context without changing replay lifecycle semantics.

Today, the closest workaround in buffer mode is roughly:

  1. custom feedback UI opens
  2. call replay.flush()
  3. call replay.pause() to avoid recording form entry
  4. on submit, send feedback with that replay id attached
  5. optionally replay.stop() + replay.startBuffering() to return to normal buffering

This is not equivalent to the behavior customers want.

What customers want

When a custom feedback form opens, they want to:

  1. preserve the last ~30 seconds before the form opened
  2. avoid recording the user filling out the form
  3. attach that preserved replay to the feedback if the user submits
  4. avoid sending anything if the user cancels
  5. return to normal buffer-mode behavior afterward
Why the current API is not enough

flush() is too strong for this use case.

In buffer mode, flush() does not just send the buffered replay. It also promotes the current replay from buffer mode to session mode for the rest of that replay's lifetime.

That creates several problems:

  • it changes replay behavior after feedback-open
  • cancel / dismiss semantics are awkward
  • returning to buffer mode requires stopping and starting a new replay
  • stopping and restarting breaks continuity and creates a new replay id / timeline
  • the workaround is brittle because it coordinates several async lifecycle operations

pause() and stop() also do not solve the core problem on their own:

  • pause() prevents further recording but does not create a stable "frozen buffer handle"
  • stop() ends the replay entirely rather than preserving and deferring attachment cleanly
Current behavior

This is especially visible for custom mobile feedback UIs.

If the host app owns the feedback UI lifecycle, the SDK does not have a public API for:

  • "feedback opened"
  • "freeze current buffer now"
  • "attach this preserved replay later on submit"
  • "discard it on cancel"
  • "resume buffering without promotion"

The built-in feedback UI can coordinate replay behavior internally, but custom flows cannot.

Requested behavior

Expose a supported public API for custom feedback flows that separates:

  • freeze/preserve current buffered replay context
    from
  • flush and promote into session mode

In other words, the missing primitive is something like:

  • preserve current rolling buffer at feedback-open
  • optionally pause/exclude the form interval
  • attach/send the preserved replay on submit
  • discard it on cancel
  • resume normal buffering behavior afterward

The exact API shape is open, but the semantics are the important part.

Example use case

A customer has Replay running in buffer mode and a custom in-app bug report UI.

A user encounters a bug, opens the feedback form, types for 20-30 seconds, and submits.

Expected result:

  • the attached replay primarily shows the lead-up to the bug and the moment the user decided to report it
  • the form-entry period is excluded or not dominant
  • the SDK can return to buffer mode cleanly afterward

Actual result today:

  • if replay is captured at submit time, the replay mostly shows the user filling out the form
  • if the app uses flush() as a workaround, replay is promoted from buffer mode to session mode
  • if the app stops and restarts replay to get back to buffering, continuity is broken
Additional context

This came up from a real customer integration using custom in-app feedback with mobile Session Replay.

We also saw Android logs during workaround testing that may indicate lifecycle/storage brittleness during this flow:

Failed to execute task CaptureStrategy.runInBackground
java.io.IOException: No such file or directory
...
at io.sentry.android.replay.ReplayCache.persistSegmentValues
...
at io.sentry.android.replay.capture.BufferCaptureStrategy.stop

That log may be a separate bug, but it reinforces that the current workaround path is not robust enough to treat as the intended solution.

Cross-platform coordination required

This is a cross-platform issue; we'll want to coordinate any solution with iOS. Writing a develop-docs PR could be a good place to start.

Related
  • getsentry/sentry-javascript#16541 fixed the built-in JS feedback widget behavior
  • getsentry/sentry-javascript#10581 is adjacent but broader / older
  • this issue is specifically about custom mobile feedback flows and the lack of a public replay lifecycle primitive for them
Possible acceptance criteria
  • A host app can preserve the current buffer at feedback-open without promoting the replay to session mode
  • A host app can later attach/send that preserved replay on feedback submit
  • A host app can discard the preserved replay on cancel
  • A host app can exclude or pause the form-entry interval
  • A host app can resume normal buffer-mode recording afterward without forcing a new full-session replay model
主要言語
Kotlin
スター
1.4k
フォーク
478
平均マージ
3日 2時間
マージ済み PR(30日)
70

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

getsentry/sentry-java のほかの issue

getsentry/sentry-java の issue をすべて見る

似ている issue

Kotlin の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。