Repository navigation
Conversation
size-limit report 📦
|
Session Replay Browser E2E ResultsDetails
Flaky testschromium › e2e/shadow-dom.spec.ts › captureAdoptedStyleSheets option › SDK initializes without error and captures shadow host with default (true) |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft implementation for SRF-63 (https://linear.app/amplitude/issue/SRF-63/support-custom-text-masking-callbacks-in-browser-session-replay).
Summary
Adds optional, local-only
privacyConfig.maskTextFn(text, element)andprivacyConfig.maskInputFn(text, element). They replace the default*redaction for content the SDK would already mask (for exampledefaultMaskLevel: 'conservative'). Behavior is unchanged when they are unset.Semantics
amp-mask/data-amp-mask/maskSelectormatches, unmasked content, or password inputs.parsePrivacyConfigignores it, andjoined-configcarries the local callbacks over when a remote privacy config is merged (the joined config is otherwise rebuilt from scratch and would have dropped them).urlMaskLevelsstill decide whether content is masked at all.Changes
session-replay-dom-privacy: new types;isMaskedinternals now report whether masking was explicit or level-based;maskFnapplies callbacks.session-replay-browser: preserve callbacks in joined config.plugin-session-replay-browser: forward the new fields (the plugin copiesprivacyConfigfield by field) and add types.Open questions
maskSelector/amp-maskreally bypass the callback (current choice, safer)?maskAttributes/maskAttributeFnis not covered. The related bug Session Replay: maskAttributes isn't applied to nodes added after the first snapshot; please move off @amplitude/rrweb-record 2.0.0-alpha.40 #2027 (maskAttributes not applied to nodes added after the first snapshot) is separate.Testing
session-replay-dom-privacy,session-replay-browser,plugin-session-replay-browser: jest passes with coverage thresholds met; lint passes.session-replay-browserpnpm typecheckreports an existing error ine2e/idb.spec.ts, which also occurs without these changes.