Skip to content

feat(replay): Allow using browserReplayIntegration without isWeb guard #4858

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

Merged
merged 4 commits into from
May 27, 2025

Conversation

krystofwoldrich
Copy link
Member

📢 Type of change

  • Enhancement
  • Refactoring

📜 Description

With this change users don't have to wrap browserReplayIntegration with isWeb guard.

And MobileReplay can use in the future the same interface for the manual controls.

The change of the interface is possible breaking change and the base of the PR is v7.

💚 How did you test it?

unit test, sample app

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

Copy link
Contributor

github-actions bot commented May 23, 2025

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 060a6a9

Copy link
Contributor

github-actions bot commented May 23, 2025

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1221.75 ms 1237.24 ms 15.49 ms
Size 2.63 MiB 3.76 MiB 1.13 MiB

Baseline results on branch: v7

Startup times

Revision Plain With Sentry Diff
9fbcfaf+dirty 1216.66 ms 1212.06 ms -4.60 ms
9da5c4e+dirty 1231.84 ms 1235.49 ms 3.65 ms
8a54dff+dirty 1226.17 ms 1227.79 ms 1.63 ms

App size

Revision Plain With Sentry Diff
9fbcfaf+dirty 2.63 MiB 3.77 MiB 1.14 MiB
9da5c4e+dirty 2.63 MiB 3.76 MiB 1.13 MiB
8a54dff+dirty 2.63 MiB 3.79 MiB 1.16 MiB

Previous results on branch: kw-browser-replay-in-non-browser-envs

Startup times

Revision Plain With Sentry Diff
98e501d+dirty 1227.71 ms 1223.98 ms -3.74 ms

App size

Revision Plain With Sentry Diff
98e501d+dirty 2.63 MiB 3.79 MiB 1.16 MiB

Copy link
Contributor

github-actions bot commented May 23, 2025

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1227.80 ms 1231.72 ms 3.92 ms
Size 3.19 MiB 4.33 MiB 1.14 MiB

Baseline results on branch: v7

Startup times

Revision Plain With Sentry Diff
9fbcfaf+dirty 1215.22 ms 1222.26 ms 7.04 ms
9da5c4e+dirty 1215.41 ms 1226.38 ms 10.97 ms
8a54dff+dirty 1244.29 ms 1254.71 ms 10.43 ms

App size

Revision Plain With Sentry Diff
9fbcfaf+dirty 3.19 MiB 4.34 MiB 1.15 MiB
9da5c4e+dirty 3.19 MiB 4.33 MiB 1.14 MiB
8a54dff+dirty 3.19 MiB 4.35 MiB 1.17 MiB

Previous results on branch: kw-browser-replay-in-non-browser-envs

Startup times

Revision Plain With Sentry Diff
98e501d+dirty 1221.96 ms 1221.78 ms -0.18 ms

App size

Revision Plain With Sentry Diff
98e501d+dirty 3.19 MiB 4.35 MiB 1.17 MiB

Copy link
Contributor

github-actions bot commented May 23, 2025

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 423.37 ms 415.69 ms -7.68 ms
Size 17.75 MiB 19.56 MiB 1.82 MiB

Baseline results on branch: v7

Startup times

Revision Plain With Sentry Diff
8a54dff 482.57 ms 467.16 ms -15.41 ms
9fbcfaf 420.06 ms 435.31 ms 15.25 ms
9da5c4e 478.08 ms 467.46 ms -10.63 ms

App size

Revision Plain With Sentry Diff
8a54dff 17.75 MiB 19.54 MiB 1.80 MiB
9fbcfaf 17.75 MiB 19.54 MiB 1.79 MiB
9da5c4e 17.75 MiB 20.16 MiB 2.41 MiB

Previous results on branch: kw-browser-replay-in-non-browser-envs

Startup times

Revision Plain With Sentry Diff
98e501d 408.12 ms 397.90 ms -10.22 ms

App size

Revision Plain With Sentry Diff
98e501d 17.75 MiB 19.55 MiB 1.81 MiB

Copy link
Contributor

github-actions bot commented May 23, 2025

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 419.31 ms 424.22 ms 4.91 ms
Size 7.15 MiB 8.32 MiB 1.17 MiB

Baseline results on branch: v7

Startup times

Revision Plain With Sentry Diff
8a54dff+dirty 393.65 ms 392.32 ms -1.33 ms
9fbcfaf+dirty 417.92 ms 431.81 ms 13.90 ms
9da5c4e+dirty 399.70 ms 407.34 ms 7.64 ms

App size

Revision Plain With Sentry Diff
8a54dff+dirty 7.15 MiB 8.30 MiB 1.15 MiB
9fbcfaf+dirty 7.15 MiB 8.29 MiB 1.14 MiB
9da5c4e+dirty 7.15 MiB 8.42 MiB 1.27 MiB

Previous results on branch: kw-browser-replay-in-non-browser-envs

Startup times

Revision Plain With Sentry Diff
98e501d+dirty 402.79 ms 407.75 ms 4.96 ms

App size

Revision Plain With Sentry Diff
98e501d+dirty 7.15 MiB 8.31 MiB 1.15 MiB

Copy link
Collaborator

@antonis antonis left a comment

Choose a reason for hiding this comment

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

LGTM 🚀
Thank you for the added test 🙇

@lucas-zimerman
Copy link
Collaborator

Q: isn't this change going to increase the SDK size for users by always bundling the web replay?

Co-authored-by: LucasZF <lucas-zimerman1@hotmail.com>
@krystofwoldrich
Copy link
Member Author

krystofwoldrich commented May 27, 2025

Q: isn't this change going to increase the SDK size for users by always bundling the web replay?

Good point, but no, this is not changing the bundle size, unless excluded by the Sentry Metro Plugin the Browser Replay is always included in the bundle already.

@krystofwoldrich krystofwoldrich merged commit e171ea3 into v7 May 27, 2025
78 of 80 checks passed
@krystofwoldrich krystofwoldrich deleted the kw-browser-replay-in-non-browser-envs branch May 27, 2025 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants