Skip to content

Session replay: apply remote (server-side) masking config #639

Description

@ioannisj

Part of the replay parity tracker PostHog/posthog#30889.

Problem

Replay masking is configured from local SDK config only. processSessionRecordingConfig in PostHogRemoteConfig.kt parses sampleRate, eventTriggers, minimumDuration, linkedFlag, endpoint, and consoleLog from the server response, but masking is left as a // TODO (around PostHogRemoteConfig.kt:454), so server-delivered masking never reaches the recorder. Masking exists only as local config (PostHogSessionReplayConfig: maskAllTextInputs, maskAllImages).

Scope

  • Parse the masking block from the remote-config sessionRecording payload, store it, and apply it to the replay masking pipeline.

Reference: posthog-js applies server-side masking in packages/browser/src/extensions/replay/external/lazy-loaded-session-recorder.ts (masking_server_side = this._remoteConfig?.masking) and session-recording.ts.

Parity across SDKs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions