File tree Expand file tree Collapse file tree 5 files changed +9
-16
lines changed
dev-packages/browser-integration-tests/suites/replay/autoFlushOnFeedback
packages/replay-internal/src Expand file tree Collapse file tree 5 files changed +9
-16
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,8 @@ Sentry.init({
61
61
});
62
62
```
63
63
64
+ - (Session Replay) The ` _experiments.autoFlushOnFeedback ` option was removed and is now default behavior.
65
+
64
66
## 3. Behaviour Changes
65
67
66
68
### Removal of First Input Delay (FID) Web Vital Reporting
Original file line number Diff line number Diff line change @@ -5,9 +5,6 @@ window.Replay = Sentry.replayIntegration({
5
5
flushMinDelay : 200 ,
6
6
flushMaxDelay : 200 ,
7
7
useCompression : false ,
8
- _experiments : {
9
- autoFlushOnFeedback : true ,
10
- } ,
11
8
} ) ;
12
9
13
10
Sentry . init ( {
Original file line number Diff line number Diff line change @@ -939,7 +939,7 @@ export class ReplayContainer implements ReplayContainerInterface {
939
939
940
940
// There is no way to remove these listeners, so ensure they are only added once
941
941
if ( ! this . _hasInitializedCoreListeners ) {
942
- addGlobalListeners ( this , { autoFlushOnFeedback : this . _options . _experiments . autoFlushOnFeedback } ) ;
942
+ addGlobalListeners ( this ) ;
943
943
944
944
this . _hasInitializedCoreListeners = true ;
945
945
}
Original file line number Diff line number Diff line change @@ -235,9 +235,8 @@ export interface ReplayPluginOptions extends ReplayNetworkOptions {
235
235
* https://github.com/rrweb-io/rrweb/blob/master/docs/recipes/cross-origin-iframes.md#considerations
236
236
*/
237
237
recordCrossOriginIframes : boolean ;
238
- autoFlushOnFeedback : boolean ;
239
238
/**
240
- * Completetly ignore mutations matching the given selectors.
239
+ * Completely ignore mutations matching the given selectors.
241
240
* This can be used if a specific type of mutation is causing (e.g. performance) problems.
242
241
* NOTE: This can be dangerous to use, as mutations are applied as incremental patches.
243
242
* Make sure to verify that the captured replays still work when using this option.
Original file line number Diff line number Diff line change @@ -16,10 +16,7 @@ import type { ReplayContainer } from '../types';
16
16
/**
17
17
* Add global listeners that cannot be removed.
18
18
*/
19
- export function addGlobalListeners (
20
- replay : ReplayContainer ,
21
- { autoFlushOnFeedback } : { autoFlushOnFeedback ?: boolean } ,
22
- ) : void {
19
+ export function addGlobalListeners ( replay : ReplayContainer ) : void {
23
20
// Listeners from core SDK //
24
21
const client = getClient ( ) ;
25
22
@@ -64,17 +61,15 @@ export function addGlobalListeners(
64
61
const replayId = replay . getSessionId ( ) ;
65
62
if ( options ?. includeReplay && replay . isEnabled ( ) && replayId && feedbackEvent . contexts ?. feedback ) {
66
63
// In case the feedback is sent via API and not through our widget, we want to flush replay
67
- if ( feedbackEvent . contexts . feedback . source === 'api' && autoFlushOnFeedback ) {
64
+ if ( feedbackEvent . contexts . feedback . source === 'api' ) {
68
65
await replay . flush ( ) ;
69
66
}
70
67
feedbackEvent . contexts . feedback . replay_id = replayId ;
71
68
}
72
69
} ) ;
73
70
74
- if ( autoFlushOnFeedback ) {
75
- client . on ( 'openFeedbackWidget' , async ( ) => {
76
- await replay . flush ( ) ;
77
- } ) ;
78
- }
71
+ client . on ( 'openFeedbackWidget' , async ( ) => {
72
+ await replay . flush ( ) ;
73
+ } ) ;
79
74
}
80
75
}
You can’t perform that action at this time.
0 commit comments