Skip to content

Commit

Permalink
ten minutes
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed Oct 23, 2023
1 parent 14065e6 commit c708934
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/__tests__/extensions/sessionrecording.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
RECORDING_IDLE_ACTIVITY_TIMEOUT_MS,
RECORDING_MAX_EVENT_SIZE,
SessionRecording,
THIRTY_MINUTES_IN_MS,
TEN_MINUTES_IN_MS,
} from '../../extensions/sessionrecording'
import { PostHogPersistence } from '../../posthog-persistence'
import {
Expand Down Expand Up @@ -264,7 +264,7 @@ describe('SessionRecording', () => {
plugins: [],
inlineStylesheet: true,
recordCrossOriginIframes: false,
checkoutEveryNms: THIRTY_MINUTES_IN_MS,
checkoutEveryNms: TEN_MINUTES_IN_MS,
})
})

Expand Down
4 changes: 2 additions & 2 deletions src/extensions/sessionrecording.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { logger, loadScript, _timestamp, window } from '../utils'
const BASE_ENDPOINT = '/s/'

export const RECORDING_IDLE_ACTIVITY_TIMEOUT_MS = 5 * 60 * 1000 // 5 minutes
export const THIRTY_MINUTES_IN_MS = 30 * 60 * 1000
export const TEN_MINUTES_IN_MS = 10 * 60 * 1000
export const RECORDING_MAX_EVENT_SIZE = 1024 * 1024 * 0.9 // ~1mb (with some wiggle room)
export const RECORDING_BUFFER_TIMEOUT = 2000 // 2 seconds
export const SESSION_RECORDING_BATCH_KEY = 'recordings'
Expand Down Expand Up @@ -328,7 +328,7 @@ export class SessionRecording {
inlineStylesheet: true,
recordCrossOriginIframes: false,
//take a full snapshot after every N ms
checkoutEveryNms: THIRTY_MINUTES_IN_MS,
checkoutEveryNms: TEN_MINUTES_IN_MS,
}
// We switched from loading all of rrweb to just the record part, but
// keep backwards compatibility if someone hasn't upgraded PostHog
Expand Down

0 comments on commit c708934

Please sign in to comment.