diff --git a/frontend/src/@types/rrweb.d.ts b/frontend/src/@types/rrweb.d.ts new file mode 100644 index 0000000000000..caa3811d5057c --- /dev/null +++ b/frontend/src/@types/rrweb.d.ts @@ -0,0 +1 @@ +declare module 'rrweb/es/rrweb/packages/rrweb/src/replay/canvas' diff --git a/frontend/src/lib/api.mock.ts b/frontend/src/lib/api.mock.ts index 7da459c7baf54..f560f1f89c029 100644 --- a/frontend/src/lib/api.mock.ts +++ b/frontend/src/lib/api.mock.ts @@ -73,6 +73,7 @@ export const MOCK_DEFAULT_TEAM: TeamType = { session_recording_minimum_duration_milliseconds: null, session_recording_linked_flag: null, session_recording_network_payload_capture_config: null, + session_replay_config: null, capture_console_log_opt_in: true, capture_performance_opt_in: true, autocapture_exceptions_opt_in: false, diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsx index 9c499861b1854..4aa80c2e70e9c 100644 --- a/frontend/src/lib/constants.tsx +++ b/frontend/src/lib/constants.tsx @@ -192,6 +192,7 @@ export const FEATURE_FLAGS = { SESSION_REPLAY_IOS: 'session-replay-ios', // owner: #team-replay YEAR_IN_HOG: 'year-in-hog', // owner: #team-replay SESSION_REPLAY_EXPORT_MOBILE_DATA: 'session-replay-export-mobile-data', // owner: #team-replay + SESSION_REPLAY_CANVAS: 'session-replay-canvas', // owner: #team-replay DISCUSSIONS: 'discussions', // owner: #team-replay REDIRECT_WEB_PRODUCT_ANALYTICS_ONBOARDING: 'redirect-web-product-analytics-onboarding', // owner: @biancayang RECRUIT_ANDROID_MOBILE_BETA_TESTERS: 'recruit-android-mobile-beta-testers', // owner: #team-replay diff --git a/frontend/src/lib/utils.tsx b/frontend/src/lib/utils.tsx index 52ecc1aef1839..9a08b4333d1d7 100644 --- a/frontend/src/lib/utils.tsx +++ b/frontend/src/lib/utils.tsx @@ -1714,11 +1714,20 @@ export const base64Encode = (str: string): string => { } export const base64Decode = (encodedString: string): string => { + const data = base64ToUint8Array(encodedString) + return new TextDecoder().decode(data) +} + +export const base64ArrayBuffer = (encodedString: string): ArrayBuffer => { + const data = base64ToUint8Array(encodedString) + return data.buffer +} + +export const base64ToUint8Array = (encodedString: string): Uint8Array => { const binString = atob(encodedString) const data = new Uint8Array(binString.length) for (let i = 0; i < binString.length; i++) { data[i] = binString.charCodeAt(i) } - - return new TextDecoder().decode(data) + return data } diff --git a/frontend/src/scenes/session-recordings/player/rrweb/canvas/canvas-plugin.ts b/frontend/src/scenes/session-recordings/player/rrweb/canvas/canvas-plugin.ts new file mode 100644 index 0000000000000..9cb0c03fd58c7 --- /dev/null +++ b/frontend/src/scenes/session-recordings/player/rrweb/canvas/canvas-plugin.ts @@ -0,0 +1,94 @@ +import { CanvasArg, canvasMutationData, canvasMutationParam, eventWithTime } from '@rrweb/types' +import { EventType, IncrementalSource, Replayer } from 'rrweb' +import { canvasMutation } from 'rrweb/es/rrweb/packages/rrweb/src/replay/canvas' +import { ReplayPlugin } from 'rrweb/typings/types' + +import { deserializeCanvasArg } from './deserialize-canvas-args' + +export const CanvasReplayerPlugin = (events: eventWithTime[]): ReplayPlugin => { + const canvases = new Map([]) + const containers = new Map([]) + const imageMap = new Map() + const canvasEventMap = new Map() + + const deserializeAndPreloadCanvasEvents = async (data: canvasMutationData, event: eventWithTime): Promise => { + if (!canvasEventMap.has(event)) { + const status = { isUnchanged: true } + + if ('commands' in data) { + const commands = await Promise.all( + data.commands.map(async (c) => { + const args = await Promise.all( + (c.args as CanvasArg[]).map(deserializeCanvasArg(imageMap, null, status)) + ) + return { ...c, args } + }) + ) + if (status.isUnchanged === false) { + canvasEventMap.set(event, { ...data, commands }) + } + } else { + const args = await Promise.all( + (data.args as CanvasArg[]).map(deserializeCanvasArg(imageMap, null, status)) + ) + if (status.isUnchanged === false) { + canvasEventMap.set(event, { ...data, args }) + } + } + } + } + + const cloneCanvas = (id: number, node: HTMLCanvasElement): HTMLCanvasElement => { + const cloneNode = node.cloneNode() as HTMLCanvasElement + canvases.set(id, cloneNode) + document.adoptNode(cloneNode) + return cloneNode + } + + const promises: Promise[] = [] + for (const event of events) { + if (event.type === EventType.IncrementalSnapshot && event.data.source === IncrementalSource.CanvasMutation) { + promises.push(deserializeAndPreloadCanvasEvents(event.data, event)) + } + } + + return { + onBuild: (node, { id }) => { + if (!node) { + return + } + + if (node.nodeName === 'CANVAS' && node.nodeType === 1) { + const el = containers.get(id) || document.createElement('img') + ;(node as HTMLCanvasElement).appendChild(el) + containers.set(id, el) + } + }, + + // eslint-disable-next-line @typescript-eslint/no-misused-promises + handler: async (e: eventWithTime, _isSync: boolean, { replayer }: { replayer: Replayer }) => { + if (e.type === EventType.IncrementalSnapshot && e.data.source === IncrementalSource.CanvasMutation) { + const source = replayer.getMirror().getNode(e.data.id) + const target = + canvases.get(e.data.id) || (source && cloneCanvas(e.data.id, source as HTMLCanvasElement)) + + if (!target) { + return + } + + await canvasMutation({ + event: e, + mutation: e.data, + target: target, + imageMap, + canvasEventMap, + }) + + const img = containers.get(e.data.id) + if (img) { + img.src = target.toDataURL() + } + } + }, + } as ReplayPlugin +} diff --git a/frontend/src/scenes/session-recordings/player/rrweb/canvas/deserialize-canvas-args.ts b/frontend/src/scenes/session-recordings/player/rrweb/canvas/deserialize-canvas-args.ts new file mode 100644 index 0000000000000..19370d07807f7 --- /dev/null +++ b/frontend/src/scenes/session-recordings/player/rrweb/canvas/deserialize-canvas-args.ts @@ -0,0 +1,68 @@ +import { CanvasArg } from '@rrweb/types' +import { base64ArrayBuffer } from 'lib/utils' +import { Replayer } from 'rrweb' + +type GLVarMap = Map +type CanvasContexts = CanvasRenderingContext2D | WebGLRenderingContext | WebGL2RenderingContext +const webGLVarMap: Map = new Map() + +const variableListFor = (ctx: CanvasContexts, ctor: string): any[] => { + let contextMap = webGLVarMap.get(ctx) + if (!contextMap) { + contextMap = new Map() + webGLVarMap.set(ctx, contextMap) + } + if (!contextMap.has(ctor)) { + contextMap.set(ctor, []) + } + + return contextMap.get(ctor) as any[] +} + +export const deserializeCanvasArg = ( + imageMap: Replayer['imageMap'], + ctx: CanvasContexts | null, + preload?: { + isUnchanged: boolean + } +): ((arg: CanvasArg) => Promise) => { + return async (arg: CanvasArg): Promise => { + if (arg && typeof arg === 'object' && 'rr_type' in arg) { + if (preload) { + preload.isUnchanged = false + } + if (arg.rr_type === 'ImageBitmap' && 'args' in arg) { + const args = await deserializeCanvasArg(imageMap, ctx, preload)(arg.args) + // eslint-disable-next-line prefer-spread + return await createImageBitmap.apply(null, args) + } + if ('index' in arg) { + if (preload || ctx === null) { + return arg + } + const { rr_type: name, index } = arg + return variableListFor(ctx, name)[index] + } + if ('args' in arg) { + return arg + } + if ('base64' in arg) { + return base64ArrayBuffer(arg.base64) + } + if ('src' in arg) { + return arg + } + if ('data' in arg && arg.rr_type === 'Blob') { + const blobContents = await Promise.all(arg.data.map(deserializeCanvasArg(imageMap, ctx, preload))) + const blob = new Blob(blobContents, { + type: arg.type, + }) + return blob + } + } else if (Array.isArray(arg)) { + const result = await Promise.all(arg.map(deserializeCanvasArg(imageMap, ctx, preload))) + return result + } + return arg + } +} diff --git a/frontend/src/scenes/session-recordings/player/sessionRecordingPlayerLogic.ts b/frontend/src/scenes/session-recordings/player/sessionRecordingPlayerLogic.ts index a3ce348e4bfd3..abf50543ee26a 100644 --- a/frontend/src/scenes/session-recordings/player/sessionRecordingPlayerLogic.ts +++ b/frontend/src/scenes/session-recordings/player/sessionRecordingPlayerLogic.ts @@ -44,6 +44,7 @@ import { createExportedSessionRecording } from '../file-playback/sessionRecordin import type { sessionRecordingsPlaylistLogicType } from '../playlist/sessionRecordingsPlaylistLogicType' import { playerSettingsLogic } from './playerSettingsLogic' import { COMMON_REPLAYER_CONFIG, CorsPlugin } from './rrweb' +import { CanvasReplayerPlugin } from './rrweb/canvas/canvas-plugin' import type { sessionRecordingPlayerLogicType } from './sessionRecordingPlayerLogicType' import { deleteRecording } from './utils/playerUtils' import { SessionRecordingPlayerExplorerProps } from './view-explorer/SessionRecordingPlayerExplorer' @@ -526,6 +527,10 @@ export const sessionRecordingPlayerLogic = kea( plugins.push(CorsPlugin) } + if (values.featureFlags[FEATURE_FLAGS.SESSION_REPLAY_CANVAS]) { + plugins.push(CanvasReplayerPlugin(values.sessionPlayerData.snapshotsByWindowId[windowId])) + } + cache.debug?.('tryInitReplayer', { windowId, rootFrame: values.rootFrame, diff --git a/frontend/src/scenes/settings/organization/VerifiedDomains/__snapshots__/verifiedDomainsLogic.test.ts.snap b/frontend/src/scenes/settings/organization/VerifiedDomains/__snapshots__/verifiedDomainsLogic.test.ts.snap index 70316d0884bbe..7251046b98af8 100644 --- a/frontend/src/scenes/settings/organization/VerifiedDomains/__snapshots__/verifiedDomainsLogic.test.ts.snap +++ b/frontend/src/scenes/settings/organization/VerifiedDomains/__snapshots__/verifiedDomainsLogic.test.ts.snap @@ -79,6 +79,7 @@ exports[`verifiedDomainsLogic values has proper defaults 1`] = ` "session_recording_network_payload_capture_config": null, "session_recording_opt_in": true, "session_recording_sample_rate": "1.0", + "session_replay_config": null, "slack_incoming_webhook": "", "test_account_filters": [ { diff --git a/frontend/src/scenes/settings/project/SessionRecordingSettings.tsx b/frontend/src/scenes/settings/project/SessionRecordingSettings.tsx index fa7bc14ff1041..9abe394c51fc9 100644 --- a/frontend/src/scenes/settings/project/SessionRecordingSettings.tsx +++ b/frontend/src/scenes/settings/project/SessionRecordingSettings.tsx @@ -1,10 +1,11 @@ -import { LemonButton, LemonSelect, LemonSwitch, Link } from '@posthog/lemon-ui' +import { LemonButton, LemonSelect, LemonSwitch, LemonTag, Link } from '@posthog/lemon-ui' import { useActions, useValues } from 'kea' import { AuthorizedUrlList } from 'lib/components/AuthorizedUrlList/AuthorizedUrlList' import { AuthorizedUrlListType } from 'lib/components/AuthorizedUrlList/authorizedUrlListLogic' import { FlaggedFeature } from 'lib/components/FlaggedFeature' import { FlagSelector } from 'lib/components/FlagSelector' import { FEATURE_FLAGS, SESSION_REPLAY_MINIMUM_DURATION_OPTIONS } from 'lib/constants' +import { useFeatureFlag } from 'lib/hooks/useFeatureFlag' import { IconCancel } from 'lib/lemon-ui/icons' import { LemonLabel } from 'lib/lemon-ui/LemonLabel/LemonLabel' import { featureFlagLogic } from 'lib/logic/featureFlagLogic' @@ -16,8 +17,8 @@ import { AvailableFeature } from '~/types' export function ReplayGeneral(): JSX.Element { const { updateCurrentTeam } = useActions(teamLogic) - const { currentTeam } = useValues(teamLogic) + const hasCanvasRecording = useFeatureFlag('SESSION_REPLAY_CANVAS') return (
@@ -73,6 +74,42 @@ export function ReplayGeneral(): JSX.Element { logs will be shown in the recording player to help you debug any issues.

+ {hasCanvasRecording && ( +
+ { + updateCurrentTeam({ + session_replay_config: { + ...currentTeam?.session_replay_config, + record_canvas: checked, + }, + }) + }} + label={ +
+ New + Capture canvas elements +
+ } + bordered + checked={ + currentTeam?.session_replay_config + ? !!currentTeam?.session_replay_config?.record_canvas + : false + } + /> +

+ This setting controls if browser canvas elements will be captured as part of recordings.{' '} + + + There is no way to mask canvas elements right now so please make sure they are free of + PII. + + +

+
+ )}
diff --git a/frontend/src/types.ts b/frontend/src/types.ts index 70a7e5c6c2ea6..4eb696960b790 100644 --- a/frontend/src/types.ts +++ b/frontend/src/types.ts @@ -360,6 +360,7 @@ export interface TeamType extends TeamBasicType { | { recordHeaders?: boolean; recordBody?: boolean } | undefined | null + session_replay_config: { record_canvas?: boolean } | undefined | null autocapture_exceptions_opt_in: boolean surveys_opt_in?: boolean autocapture_exceptions_errors_to_ignore: string[] diff --git a/jest.config.ts b/jest.config.ts index 7316923cd3408..bcedafd63cc06 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -103,6 +103,7 @@ const config: Config = { '^scenes/(.*)$': '/frontend/src/scenes/$1', '^antd/es/(.*)$': 'antd/lib/$1', '^react-virtualized/dist/es/(.*)$': 'react-virtualized/dist/commonjs/$1', + '^rrweb/es/rrweb': 'rrweb/dist/rrweb.min.js', d3: '/node_modules/d3/dist/d3.min.js', '^d3-(.*)$': `d3-$1/dist/d3-$1`, }, diff --git a/latest_migrations.manifest b/latest_migrations.manifest index 7abbb065d956f..81538fe8c3352 100644 --- a/latest_migrations.manifest +++ b/latest_migrations.manifest @@ -5,7 +5,7 @@ contenttypes: 0002_remove_content_type_name ee: 0015_add_verified_properties otp_static: 0002_throttling otp_totp: 0002_auto_20190420_0723 -posthog: 0385_exception_autocapture_off_for_all +posthog: 0386_add_session_replay_config_to_team sessions: 0001_initial social_django: 0010_uid_db_index two_factor: 0007_auto_20201201_1019 diff --git a/posthog/api/decide.py b/posthog/api/decide.py index 04e67514273cf..2dae5c440ef89 100644 --- a/posthog/api/decide.py +++ b/posthog/api/decide.py @@ -257,7 +257,7 @@ def get_decide(request: HttpRequest): if isinstance(linked_flag, Dict): linked_flag = linked_flag.get("key") - response["sessionRecording"] = { + session_recording_response = { "endpoint": "/s/", "consoleLogRecordingEnabled": capture_console_logs, "recorderVersion": "v2", @@ -267,6 +267,19 @@ def get_decide(request: HttpRequest): "networkPayloadCapture": team.session_recording_network_payload_capture_config or None, } + if isinstance(team.session_replay_config, Dict): + record_canvas = team.session_replay_config["record_canvas"] or False + session_recording_response.update( + { + "recordCanvas": record_canvas, + # hard coded during beta while we decide on sensible values + "canvasFps": 4 if record_canvas else None, + "canvasQuality": "0.6" if record_canvas else None, + } + ) + + response["sessionRecording"] = session_recording_response + response["surveys"] = True if team.surveys_opt_in else False site_apps = [] diff --git a/posthog/api/team.py b/posthog/api/team.py index 2393a493927b9..b7fd7301421a5 100644 --- a/posthog/api/team.py +++ b/posthog/api/team.py @@ -102,6 +102,7 @@ class Meta: "session_recording_minimum_duration_milliseconds", "session_recording_linked_flag", "session_recording_network_payload_capture_config", + "session_replay_config", "recording_domains", "inject_web_apps", "surveys_opt_in", @@ -146,6 +147,7 @@ class Meta: "session_recording_minimum_duration_milliseconds", "session_recording_linked_flag", "session_recording_network_payload_capture_config", + "session_replay_config", "effective_membership_level", "access_control", "week_start_day", @@ -208,6 +210,18 @@ def validate_session_recording_network_payload_capture_config(self, value) -> Di return value + def validate_session_replay_config(self, value) -> Dict | None: + if value is None: + return None + + if not isinstance(value, Dict): + raise exceptions.ValidationError("Must provide a dictionary or None.") + + if not all(key in ["record_canvas"] for key in value.keys()): + raise exceptions.ValidationError("Must provide a dictionary with only 'record_canvas' key.") + + return value + def validate(self, attrs: Any) -> Any: if "primary_dashboard" in attrs and attrs["primary_dashboard"].team != self.instance: raise exceptions.PermissionDenied("Dashboard does not belong to this team.") diff --git a/posthog/api/test/__snapshots__/test_action.ambr b/posthog/api/test/__snapshots__/test_action.ambr index a947ae0d7e6fb..23d13bbee0a0f 100644 --- a/posthog/api/test/__snapshots__/test_action.ambr +++ b/posthog/api/test/__snapshots__/test_action.ambr @@ -53,6 +53,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -213,6 +214,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -546,6 +548,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_annotation.ambr b/posthog/api/test/__snapshots__/test_annotation.ambr index 2b761c79a0e3b..171358c79acdc 100644 --- a/posthog/api/test/__snapshots__/test_annotation.ambr +++ b/posthog/api/test/__snapshots__/test_annotation.ambr @@ -53,6 +53,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -135,6 +136,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -466,6 +468,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_decide.ambr b/posthog/api/test/__snapshots__/test_decide.ambr index 0082db5b23262..f8208805e4c40 100644 --- a/posthog/api/test/__snapshots__/test_decide.ambr +++ b/posthog/api/test/__snapshots__/test_decide.ambr @@ -53,6 +53,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -299,6 +300,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -459,6 +461,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -612,6 +615,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_early_access_feature.ambr b/posthog/api/test/__snapshots__/test_early_access_feature.ambr index 4949adab33e99..4db55d14a92a2 100644 --- a/posthog/api/test/__snapshots__/test_early_access_feature.ambr +++ b/posthog/api/test/__snapshots__/test_early_access_feature.ambr @@ -22,6 +22,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -157,6 +158,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_element.ambr b/posthog/api/test/__snapshots__/test_element.ambr index b206ea30589d8..1b4b44f23bc84 100644 --- a/posthog/api/test/__snapshots__/test_element.ambr +++ b/posthog/api/test/__snapshots__/test_element.ambr @@ -53,6 +53,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_feature_flag.ambr b/posthog/api/test/__snapshots__/test_feature_flag.ambr index 68a540a818172..d07614325936f 100644 --- a/posthog/api/test/__snapshots__/test_feature_flag.ambr +++ b/posthog/api/test/__snapshots__/test_feature_flag.ambr @@ -461,6 +461,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -660,6 +661,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1019,6 +1021,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1155,6 +1158,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1446,6 +1450,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1535,6 +1540,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1643,6 +1649,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1844,6 +1851,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_insight.ambr b/posthog/api/test/__snapshots__/test_insight.ambr index 0dbd61eb66823..889cc84916f2c 100644 --- a/posthog/api/test/__snapshots__/test_insight.ambr +++ b/posthog/api/test/__snapshots__/test_insight.ambr @@ -643,6 +643,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -694,6 +695,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -821,6 +823,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1054,6 +1057,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1197,6 +1201,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1329,6 +1334,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1438,6 +1444,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1582,6 +1589,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1668,6 +1676,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1753,6 +1762,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1811,6 +1821,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_organization_feature_flag.ambr b/posthog/api/test/__snapshots__/test_organization_feature_flag.ambr index 381f3164ba613..470c4a160a591 100644 --- a/posthog/api/test/__snapshots__/test_organization_feature_flag.ambr +++ b/posthog/api/test/__snapshots__/test_organization_feature_flag.ambr @@ -100,6 +100,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -204,6 +205,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -290,6 +292,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -500,6 +503,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -627,6 +631,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -774,6 +779,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -860,6 +866,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1074,6 +1081,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1201,6 +1209,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1252,6 +1261,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1399,6 +1409,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1670,6 +1681,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_preflight.ambr b/posthog/api/test/__snapshots__/test_preflight.ambr index 7b51cd4a56964..b5686cfb79935 100644 --- a/posthog/api/test/__snapshots__/test_preflight.ambr +++ b/posthog/api/test/__snapshots__/test_preflight.ambr @@ -64,6 +64,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/__snapshots__/test_survey.ambr b/posthog/api/test/__snapshots__/test_survey.ambr index 2188b1b6aed2e..41c085776554e 100644 --- a/posthog/api/test/__snapshots__/test_survey.ambr +++ b/posthog/api/test/__snapshots__/test_survey.ambr @@ -132,6 +132,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr index 0ff35889aeecf..5c2e5f680c879 100644 --- a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr +++ b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr @@ -53,6 +53,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -181,6 +182,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -302,6 +304,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -516,6 +519,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -687,6 +691,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -866,6 +871,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1035,6 +1041,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1275,6 +1282,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1333,6 +1341,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1491,6 +1500,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1602,6 +1612,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1660,6 +1671,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1814,6 +1826,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1941,6 +1954,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2202,6 +2216,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2445,6 +2460,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2574,6 +2590,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2715,6 +2732,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2837,6 +2855,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2937,6 +2956,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3088,6 +3108,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3185,6 +3206,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3313,6 +3335,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3437,6 +3460,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3572,6 +3596,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3895,6 +3920,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4056,6 +4082,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4191,6 +4218,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4277,6 +4305,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4439,6 +4468,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4497,6 +4527,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4621,6 +4652,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4772,6 +4804,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5200,6 +5233,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5342,6 +5376,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5428,6 +5463,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5552,6 +5588,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5637,6 +5674,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5695,6 +5733,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5819,6 +5858,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -5960,6 +6000,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -6123,6 +6164,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -6537,6 +6579,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -6689,6 +6732,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -6873,6 +6917,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -7044,6 +7089,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -7184,6 +7230,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -7274,6 +7321,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -7443,6 +7491,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -8084,6 +8133,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -8346,6 +8396,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -8508,6 +8559,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -8566,6 +8618,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -8690,6 +8743,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -8841,6 +8895,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -8965,6 +9020,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -9101,6 +9157,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -9242,6 +9299,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -9552,6 +9610,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -9709,6 +9768,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -9814,6 +9874,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -9946,6 +10007,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -10077,6 +10139,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -10209,6 +10272,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -10393,6 +10457,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -10557,6 +10622,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -10661,6 +10727,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -10828,6 +10895,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -11007,6 +11075,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -11118,6 +11187,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -11285,6 +11355,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -11425,6 +11496,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -11638,6 +11710,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/notebooks/__snapshots__/test_notebook.ambr b/posthog/api/test/notebooks/__snapshots__/test_notebook.ambr index 550b197d0f5ca..73cb94aa52ce3 100644 --- a/posthog/api/test/notebooks/__snapshots__/test_notebook.ambr +++ b/posthog/api/test/notebooks/__snapshots__/test_notebook.ambr @@ -53,6 +53,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -207,6 +208,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -425,6 +427,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -529,6 +532,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -641,6 +645,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/api/test/test_decide.py b/posthog/api/test/test_decide.py index 468417ba8747e..b39dccfd92062 100644 --- a/posthog/api/test/test_decide.py +++ b/posthog/api/test/test_decide.py @@ -315,6 +315,31 @@ def test_session_recording_empty_linked_flag(self, *args): expected_status_code=status.HTTP_400_BAD_REQUEST, ) + def test_session_replay_config(self, *args): + # :TRICKY: Test for regression around caching + + self._update_team( + { + "session_recording_opt_in": True, + } + ) + + response = self._post_decide().json() + assert "recordCanvas" not in response["sessionRecording"] + assert "canvasFps" not in response["sessionRecording"] + assert "canvasQuality" not in response["sessionRecording"] + + self._update_team( + { + "session_replay_config": {"record_canvas": True}, + } + ) + + response = self._post_decide().json() + self.assertEqual(response["sessionRecording"]["recordCanvas"], True) + self.assertEqual(response["sessionRecording"]["canvasFps"], 4) + self.assertEqual(response["sessionRecording"]["canvasQuality"], "0.6") + def test_exception_autocapture_opt_in(self, *args): # :TRICKY: Test for regression around caching response = self._post_decide().json() diff --git a/posthog/api/test/test_team.py b/posthog/api/test/test_team.py index 6945defe10b3b..5a51bc8a83705 100644 --- a/posthog/api/test/test_team.py +++ b/posthog/api/test/test_team.py @@ -714,6 +714,22 @@ def test_can_set_and_unset_session_recording_network_payload_capture_config(self second_get_response = self.client.get("/api/projects/@current/") assert second_get_response.json()["session_recording_network_payload_capture_config"] is None + def test_can_set_and_unset_session_replay_config(self) -> None: + # can set + first_patch_response = self.client.patch( + "/api/projects/@current/", + {"session_replay_config": {"record_canvas": True}}, + ) + assert first_patch_response.status_code == status.HTTP_200_OK + get_response = self.client.get("/api/projects/@current/") + assert get_response.json()["session_replay_config"] == {"record_canvas": True} + + # can unset + response = self.client.patch("/api/projects/@current/", {"session_replay_config": None}) + assert response.status_code == status.HTTP_200_OK + second_get_response = self.client.get("/api/projects/@current/") + assert second_get_response.json()["session_replay_config"] is None + def create_team(organization: Organization, name: str = "Test team") -> Team: """ diff --git a/posthog/migrations/0386_add_session_replay_config_to_team.py b/posthog/migrations/0386_add_session_replay_config_to_team.py new file mode 100644 index 0000000000000..5560d0c1df4a1 --- /dev/null +++ b/posthog/migrations/0386_add_session_replay_config_to_team.py @@ -0,0 +1,17 @@ +# Generated by Django 3.2.19 on 2024-01-03 16:51 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("posthog", "0385_exception_autocapture_off_for_all"), + ] + + operations = [ + migrations.AddField( + model_name="team", + name="session_replay_config", + field=models.JSONField(blank=True, null=True), + ), + ] diff --git a/posthog/models/filters/test/__snapshots__/test_filter.ambr b/posthog/models/filters/test/__snapshots__/test_filter.ambr index 203c587fc0389..798a020dd3f35 100644 --- a/posthog/models/filters/test/__snapshots__/test_filter.ambr +++ b/posthog/models/filters/test/__snapshots__/test_filter.ambr @@ -22,6 +22,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -80,6 +81,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -138,6 +140,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -196,6 +199,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -254,6 +258,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/models/team/team.py b/posthog/models/team/team.py index 014abf40dc986..c815e75811456 100644 --- a/posthog/models/team/team.py +++ b/posthog/models/team/team.py @@ -184,6 +184,7 @@ class Team(UUIDClassicModel): ) session_recording_linked_flag: models.JSONField = models.JSONField(null=True, blank=True) session_recording_network_payload_capture_config: models.JSONField = models.JSONField(null=True, blank=True) + session_replay_config: models.JSONField = models.JSONField(null=True, blank=True) capture_console_log_opt_in: models.BooleanField = models.BooleanField(null=True, blank=True) capture_performance_opt_in: models.BooleanField = models.BooleanField(null=True, blank=True) surveys_opt_in: models.BooleanField = models.BooleanField(null=True, blank=True) diff --git a/posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr b/posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr index 3ab7e2a06682a..affde7090e435 100644 --- a/posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr +++ b/posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr @@ -22,6 +22,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -80,6 +81,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -138,6 +140,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -196,6 +199,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -254,6 +258,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -343,6 +348,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -468,6 +474,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -663,6 +670,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -721,6 +729,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -779,6 +788,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -837,6 +847,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -895,6 +906,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -953,6 +965,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1011,6 +1024,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1100,6 +1114,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1162,6 +1177,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1251,6 +1267,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1521,6 +1538,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1610,6 +1628,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1893,6 +1912,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -1982,6 +2002,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2223,6 +2244,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2311,6 +2333,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2400,6 +2423,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2696,6 +2720,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2785,6 +2810,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -2836,6 +2862,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3342,6 +3369,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3431,6 +3459,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3693,6 +3722,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -3793,6 +3823,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4057,6 +4088,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4146,6 +4178,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4423,6 +4456,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -4512,6 +4546,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/tasks/test/__snapshots__/test_process_scheduled_changes.ambr b/posthog/tasks/test/__snapshots__/test_process_scheduled_changes.ambr index 0e3728f3faad9..9221846d37753 100644 --- a/posthog/tasks/test/__snapshots__/test_process_scheduled_changes.ambr +++ b/posthog/tasks/test/__snapshots__/test_process_scheduled_changes.ambr @@ -91,6 +91,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -344,6 +345,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", diff --git a/posthog/test/__snapshots__/test_feature_flag.ambr b/posthog/test/__snapshots__/test_feature_flag.ambr index 76ad9fae52868..10e3eeb053e40 100644 --- a/posthog/test/__snapshots__/test_feature_flag.ambr +++ b/posthog/test/__snapshots__/test_feature_flag.ambr @@ -113,6 +113,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in", @@ -500,6 +501,7 @@ "posthog_team"."session_recording_minimum_duration_milliseconds", "posthog_team"."session_recording_linked_flag", "posthog_team"."session_recording_network_payload_capture_config", + "posthog_team"."session_replay_config", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", "posthog_team"."surveys_opt_in",