Skip to content

Commit c63c6d9

Browse files
authored
ref(replay): Remove unused initialFlushDelay option (getsentry#6867)
This is not in use anymore - we always flush immediately on load.
1 parent a524654 commit c63c6d9

File tree

7 files changed

+4
-13
lines changed

7 files changed

+4
-13
lines changed

packages/integration-tests/suites/replay/captureReplayViaBrowser/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as Sentry from '@sentry/browser';
33
window.Sentry = Sentry;
44
window.Replay = new Sentry.Replay({
55
flushMinDelay: 200,
6-
initialFlushDelay: 200,
6+
flushMaxDelay: 200,
77
});
88

99
Sentry.init({

packages/integration-tests/suites/replay/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Replay } from '@sentry/replay';
44
window.Sentry = Sentry;
55
window.Replay = new Replay({
66
flushMinDelay: 200,
7-
initialFlushDelay: 200,
7+
flushMaxDelay: 200,
88
});
99

1010
Sentry.init({

packages/integration-tests/suites/replay/sampling/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Replay } from '@sentry/replay';
44
window.Sentry = Sentry;
55
window.Replay = new Replay({
66
flushMinDelay: 200,
7-
initialFlushDelay: 200,
7+
flushMaxDelay: 200,
88
});
99

1010
Sentry.init({

packages/replay/src/constants.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ export const MASK_ALL_TEXT_SELECTOR = 'body *:not(style), body *:not(script)';
3232
/** Default flush delays */
3333
export const DEFAULT_FLUSH_MIN_DELAY = 5_000;
3434
export const DEFAULT_FLUSH_MAX_DELAY = 5_000;
35-
export const INITIAL_FLUSH_DELAY = 5_000;
3635

3736
export const RETRY_BASE_INTERVAL = 5000;
3837
export const RETRY_MAX_COUNT = 3;

packages/replay/src/integration.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
DEFAULT_FLUSH_MAX_DELAY,
77
DEFAULT_FLUSH_MIN_DELAY,
88
DEFAULT_SESSION_SAMPLE_RATE,
9-
INITIAL_FLUSH_DELAY,
109
MASK_ALL_TEXT_SELECTOR,
1110
} from './constants';
1211
import { ReplayContainer } from './replay';
@@ -43,7 +42,6 @@ export class Replay implements Integration {
4342
public constructor({
4443
flushMinDelay = DEFAULT_FLUSH_MIN_DELAY,
4544
flushMaxDelay = DEFAULT_FLUSH_MAX_DELAY,
46-
initialFlushDelay = INITIAL_FLUSH_DELAY,
4745
stickySession = true,
4846
useCompression = true,
4947
sessionSampleRate,
@@ -73,7 +71,6 @@ export class Replay implements Integration {
7371
flushMinDelay,
7472
flushMaxDelay,
7573
stickySession,
76-
initialFlushDelay,
7774
sessionSampleRate: DEFAULT_SESSION_SAMPLE_RATE,
7875
errorSampleRate: DEFAULT_ERROR_SAMPLE_RATE,
7976
useCompression,

packages/replay/src/replay.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ export class ReplayContainer implements ReplayContainerInterface {
178178
this._updateSessionActivity();
179179

180180
this.eventBuffer = createEventBuffer({
181-
useCompression: Boolean(this._options.useCompression),
181+
useCompression: this._options.useCompression,
182182
});
183183

184184
this._addListeners();

packages/replay/src/types.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,6 @@ export interface ReplayPluginOptions extends SessionOptions {
8585
*/
8686
flushMaxDelay: number;
8787

88-
/**
89-
* The amount of time to buffer the initial snapshot
90-
*/
91-
initialFlushDelay: number;
92-
9388
/**
9489
* Attempt to use compression when web workers are available
9590
*

0 commit comments

Comments
 (0)