Skip to content

Commit cfc6491

Browse files
romtsncursoragentstefanosiano
authored andcommitted
chore(feedback): Update session replay integration documentation (#14200)
Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Stefano <stefano.siano@sentry.io>
1 parent 920568d commit cfc6491

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

develop-docs/sdk/expected-features/index.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,20 @@ crash events to send.
155155

156156
#### Session Replay Integration with Feedback Widgets
157157

158-
When a feedback widget is added to an application and Session Replay's `onErrorSampleRate` is greater than 0, the SDK must sample the replay when the widget **opens**, not when the feedback is submitted. This timing is critical because:
158+
When Session Replay's `onErrorSampleRate` is greater than 0, SDKs must integrate replay capture with feedback functionality. The timing of replay sampling depends on how feedback is captured:
159+
160+
**Feedback Widget Integration:**
161+
When a feedback widget is added to an application, the SDK must sample the replay when the widget **opens**, not when the feedback is submitted. This timing is critical because:
159162

160163
- Sampling when the widget opens captures the user's session leading up to the feedback moment
161164
- Sampling only when feedback is submitted would result in the replay buffer primarily showing the user typing their message, which provides minimal debugging context
162165
- The replay buffer should contain the user's actions and application state prior to encountering the issue they're reporting
163166

164167
SDKs should trigger replay sampling and flushing as soon as the feedback widget becomes visible to the user, ensuring the complete context is captured regardless of whether the user ultimately submits the feedback.
165168

169+
**Manual API Integration:**
170+
When feedback is captured using the manual API, the SDK must sample and flush the replay during the execution of the feedback capture API to ensure session context is preserved.
171+
166172
### Backend Platforms
167173

168174
On backend platforms, SDKs should document how to use the [last event ID](#retrieve-last-event-id) to prompt the user for feedback themselves.

0 commit comments

Comments
 (0)