feat: Add attrUnmaskAllowlist RUM config option#4209
Open
andrewatwood wants to merge 1 commit intoDataDog:mainfrom
Open
feat: Add attrUnmaskAllowlist RUM config option#4209andrewatwood wants to merge 1 commit intoDataDog:mainfrom
attrUnmaskAllowlist RUM config option#4209andrewatwood wants to merge 1 commit intoDataDog:mainfrom
Conversation
223ec43 to
019da50
Compare
Signed-off-by: andrewatwood <sandurz@gmail.com>
019da50 to
838f1b1
Compare
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.
Motivation
When masking is enabled, RUM automatically masks all
data-*attributes to prevent data leakage and slim down replay frame payloads. However, some UI libraries use CSS selectors that target certaindata-*attributes and values, which can lead to breakage of styles and rendering issues during replay playback. We need a way to maintain these styles during playback and this seems like a relatively straightforward way to do so.I thought about making this a map of attributes and allowed values for each attribute, but wanted to keep the surface of the checks small. There may be some perf optimization needed for such a high-frequency check but tested this as a proof-of-concept locally and saw the results I was after, so just starting with this base implementation to get a temperature check on a feature like this.
Changes
attrUnmaskAllowlistoption to the RUM configurationTest instructions
data-*attribute values (ie.data-state=open)attrUnmaskAllowlistprovidedattrUnmaskAllowlistOnce again I will likely need integration test help as I'm unable to run suites beyond the unit tests.
Checklist