-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(replays): Show the correct Replay config option name maskFn
#8169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, good catch!
@@ -330,7 +330,7 @@ export interface ReplayIntegrationPrivacyOptions { | |||
/** | |||
* A callback function to customize how your text is masked. | |||
*/ | |||
maskFn?: Pick<RecordingOptions, 'maskTextFn'>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is correct because it comes from rrweb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah nevermind, I misread, you're right!
@@ -330,7 +330,7 @@ export interface ReplayIntegrationPrivacyOptions { | |||
/** | |||
* A callback function to customize how your text is masked. | |||
*/ | |||
maskFn?: Pick<RecordingOptions, 'maskTextFn'>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah nevermind, I misread, you're right!
@billyvg it might make sense to go through more deeply and align the names internally in the codebase too. I'm not the authority on what we should be publishing here, but we're passing |
|
size-limit report 📦
|
ok! |
Typescript says that the function is called
maskFn
, but the tests are passing inmaskTextFn
to something...Something is inconsistent, and either way the type,
Pick<RecordingOptions, 'maskTextFn'>
, is wrong!!! RecordingOptions doesn't have eithermaskFn
ormaskTextFn
, it's coming from here: https://github.com/getsentry/sentry-javascript/blob/ryan953/replay-maskFn-docs/packages/replay/src/types/rrweb.ts#L32-L41https://github.com/getsentry/sentry-javascript/blob/master/packages/replay/src/types.ts#L314-L317
See also: getsentry/sentry-docs#6988