-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat(replay): Expose rrweb recordCrossOriginIframes under _experiments #14916
feat(replay): Expose rrweb recordCrossOriginIframes under _experiments #14916
Conversation
getsentry#14809) Expose the `recordCrossOriginIframes` option under `_experiments`. This option records cross-origin iframes for session replay.
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.
Thanks for the PR, sorry this got lost. This looks good aside from the one comment.
// experimental support for recording iframes from different origins | ||
if (_experiments.recordCrossOriginIframes) { | ||
this._recordingOptions.recordCrossOriginIframes = true; | ||
} | ||
|
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.
Can you add this directly to this._recordingOptions
?
this._recordingOptions = {
...
recordCrossOriginIframes: Boolean(_experiments.recordCrossOriginIframes),
};
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.
Seems reasonable for an experimental flag, let's maybe just inform users about possible risks with this setting. Thanks for adding!
@@ -229,6 +229,7 @@ export interface ReplayPluginOptions extends ReplayNetworkOptions { | |||
captureExceptions: boolean; | |||
traceInternals: boolean; | |||
continuousCheckout: number; | |||
recordCrossOriginIframes: boolean; |
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.
We could leave a note here for security concerns and link to https://github.com/rrweb-io/rrweb/blob/master/docs/recipes/cross-origin-iframes.md
Closes #14809.
I have tested this with my project and it sort of works. While it's not perfect (sometimes produces an unplayable replay), it might unblock other users looking to experiment with this feature.
Verify:
yarn lint
) & (yarn test
).This just exposes the API under experiments, as such I don't think it requires tests.