Skip to content
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

[SR] Capture screen names as urls #3505

Merged
merged 7 commits into from
Jul 2, 2024

Conversation

romtsn
Copy link
Member

@romtsn romtsn commented Jun 21, 2024

#skip-changelog

📜 Description

  • Adds an option to disable screen tracking - this is necessary for RN/Flutter, so they can set their own screens to the native scope and we won't override them
  • Adds screen tracking to the missing places (fragment and navigation integrations) to match what we capture as navigation breadcrumbs for replay
  • Fills in replay.urls array based on navigation breadcrumbs
  • For the buffer mode: we have to know what was the last screen before the buffer replay started to display the correct screen name. For that we:
    • Install ScopeObserver to observe whenever scope.screen changes and persist it with timestamp
    • When capturing the buffered replay we then search for the last screen before the buffered replay started and add it to the replay.urls array

💡 Motivation and Context

Part of getsentry/sentry#70065

example buffered replay: https://sentry-sdks.sentry.io/replays/0a7eb9067746443c90cfad13662349d3/?project=5428559&query=&referrer=%2Freplays%2F%3AreplaySlug%2F&statsPeriod=1h&yAxis=count%28%29&t=0

and its json payload:
https://us.sentry.io/api/0/projects/sentry-sdks/sentry-android/replays/0a7eb9067746443c90cfad13662349d3/

@romtsn romtsn changed the title WIP [SR] Capture screen names as urls Jun 21, 2024
Copy link
Contributor

github-actions bot commented Jun 21, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 431.22 ms 519.35 ms 88.12 ms
Size 1.70 MiB 2.33 MiB 643.22 KiB

Baseline results on branch: rz/feat/session-replay

Startup times

Revision Plain With Sentry Diff
547b3f8 388.65 ms 470.27 ms 81.61 ms
639e47c 444.10 ms 558.02 ms 113.92 ms
b57c020 502.80 ms 620.77 ms 117.97 ms

App size

Revision Plain With Sentry Diff
547b3f8 1.70 MiB 2.33 MiB 641.35 KiB
639e47c 1.70 MiB 2.33 MiB 641.89 KiB
b57c020 1.70 MiB 2.33 MiB 641.35 KiB

Previous results on branch: rz/feat/session-replay-urls

Startup times

Revision Plain With Sentry Diff
169b00a 414.80 ms 472.69 ms 57.90 ms
21a6a6e 387.94 ms 455.66 ms 67.72 ms
7d84a9e 362.57 ms 408.65 ms 46.08 ms
b2c07ee 426.06 ms 503.42 ms 77.36 ms

App size

Revision Plain With Sentry Diff
169b00a 1.70 MiB 2.33 MiB 643.23 KiB
21a6a6e 1.70 MiB 2.33 MiB 643.15 KiB
7d84a9e 1.70 MiB 2.33 MiB 643.22 KiB
b2c07ee 1.70 MiB 2.33 MiB 643.15 KiB

@romtsn romtsn marked this pull request as ready for review June 22, 2024 21:43
Base automatically changed from rz/feat/session-replay-multi-touch to rz/feat/session-replay June 22, 2024 21:48
Copy link

@brustolin brustolin left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@markushi markushi left a comment

Choose a reason for hiding this comment

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

Nice one! LGTM!

@romtsn romtsn merged commit 2f727bc into rz/feat/session-replay Jul 2, 2024
@romtsn romtsn deleted the rz/feat/session-replay-urls branch July 2, 2024 09:57
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.

None yet

4 participants