Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.

ref: Flatten configuration object - #226

Merged
JoshFerge merged 11 commits into
mainfrom
ref/remove-recordingConfig-object-flatten
Oct 5, 2022
Merged

JoshFerge merged 11 commits into
mainfrom
ref/remove-recordingConfig-object-flatten

Conversation

@billyvg

@billyvg billyvg commented Sep 27, 2022 •

Copy link
Copy Markdown
Member

Remove recordingConfig and combine all configuration into a single object. This will simplify configuration instead of having an arbitrary recordingConfig object from the user POV. Update README to add more available configuration.

Fixes #157

@github-actions

github-actions Bot commented Sep 27, 2022 •

Copy link
Copy Markdown

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
dist/index.js 32.24 KB (+0.13% 🔺) 645 ms (+0.13% 🔺) 52 ms (+237.36% 🔺) 697 ms

@billyvg
billyvg marked this pull request as ready for review September 28, 2022 16:47
billyvg and others added 6 commits September 29, 2022 14:26
Remove `recordingConfig` and combine all configuration into a single object. This will simplify configuration instead of having an arbitrary `recordingConfig` object from the user POV. Update README to add more available configuration.
Small grammar/punctuation tweaks
@billyvg
billyvg force-pushed the ref/remove-recordingConfig-object-flatten branch from 70b8a4d to 69437e5 Compare September 29, 2022 18:27
@billyvg
billyvg requested a review from a team September 29, 2022 18:32
Comment thread README.md Resolved
Comment thread README.md
| slimDOMOptions | Record<string, boolean> | `{}` | Remove unnecessary parts of the DOM <br /> Available keys: `script, comment, headFavicon, headWhitespace, headMetaDescKeywords, headMetaSocial, headMetaRobots, headMetaHttpEquiv, headMetaAuthorship, headMetaVerification` |

## Privacy
There are several ways to deal with PII. By default, the integration will mask all text content with `*`. This can be disabled by setting `maskAllText` to `false`. It is also possible to add the following CSS classes to specific DOM elements to prevent recording its contents: `sentry-block`, `sentry-ignore`, and `sentry-mask`. The following sections will show examples of how content is handled by the differing methods.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we expand/define "PII"

There are several ways to deal with PII (Personally Identifiable Information). By default, the ... etc...

Comment thread README.md
| key | type | default | description |
| ---------------- | ------------------------ | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| maskAllText | boolean | `true` | Mask _all_ text content. Will pass text content through `maskTextFn` before sending to server. |
| maskTextFn | (text: string) => string | `(text) => '*'.repeat(text.length)` | Function to customize how text content is masked before sending to server. By default, masks text with `*`. |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(text) => '*'.repeat(text.length) looks like a simplified version of what's really running. Looks like the real replace function leaves spaces as they are.

Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved
JoshFerge and others added 3 commits October 5, 2022 12:49
Co-authored-by: Ryan Albrecht <[email protected]>
Co-authored-by: Ryan Albrecht <[email protected]>
Co-authored-by: Ryan Albrecht <[email protected]>
@JoshFerge
JoshFerge enabled auto-merge (squash) October 5, 2022 19:50
@JoshFerge
JoshFerge merged commit 9162f3e into main Oct 5, 2022
@JoshFerge
JoshFerge deleted the ref/remove-recordingConfig-object-flatten branch October 5, 2022 19:50
mydea pushed a commit to getsentry/sentry-javascript that referenced this pull request Nov 23, 2022
Remove `recordingConfig` and combine all configuration into a single
object. This will simplify configuration instead of having an arbitrary
`recordingConfig` object from the user POV. Update README to add more
available configuration.

Fixes getsentry/sentry-replay#157

Co-authored-by: Jasmin <[email protected]>
Co-authored-by: Josh Ferge <[email protected]>
Co-authored-by: Ryan Albrecht <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve docs & provide examples for differences between blockClass ignoreClass & maskTextClass config options

4 participants