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

RUM-5004 Record resources while processing snapshots #1919

Merged
merged 4 commits into from
Jun 28, 2024

Conversation

maxep
Copy link
Member

@maxep maxep commented Jun 21, 2024

What and why?

Previously, resources where created while recording the views. But in SwiftUI, we will only be able to create resources at the processing phase. To accommodate this, resources will now be created when building the wireframes and written by the snapshot processor.

How?

The SnapshotProcessor now holds a reference to a ResourceProcessor, and the SessionReplayWireframesBuilder will keep track of resources while building the wireframes. The SnapshotProcessor will pass all collected resources to its ResourceProcessor instance.

Note:
The ResourceProcessor and the ResourcesWriter are doing the same checks to deduplicate images, but on different threads. This needs a refactoring as well, but it's outside the scope of this PR.

Review checklist

  • Feature or bugfix MUST have appropriate tests (unit, integration)
  • Make sure each commit and the PR mention the Issue number or JIRA reference
  • Add CHANGELOG entry for user facing changes

Custom CI job configuration (optional)

  • Run unit tests for Session Replay
  • Run smoke tests
  • Run tests for tools/

@maxep maxep marked this pull request as ready for review June 25, 2024 10:32
@maxep maxep requested review from a team as code owners June 25, 2024 10:32
mariedm
mariedm previously approved these changes Jun 26, 2024
Copy link
Member

@mariedm mariedm left a comment

Choose a reason for hiding this comment

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

Just a few nits & questions, LGMT! 🙌

@maxep maxep force-pushed the maxep/RUM-5004/revamp-resource-recording branch from 1fb8b28 to 97f548d Compare June 27, 2024 12:07
Co-Authored-By: Marie Denis <29802155+mariedm@users.noreply.github.com>
@maxep maxep force-pushed the maxep/RUM-5004/revamp-resource-recording branch from 97f548d to 6cfaa79 Compare June 27, 2024 14:19
@maxep maxep requested a review from mariedm June 27, 2024 14:49
Copy link
Member

@mariedm mariedm left a comment

Choose a reason for hiding this comment

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

👌

@maxep maxep merged commit e93563d into develop Jun 28, 2024
11 checks passed
@maxep maxep deleted the maxep/RUM-5004/revamp-resource-recording branch June 28, 2024 07:43
@maciejburda maciejburda mentioned this pull request Jul 10, 2024
4 tasks
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.

2 participants