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

chore: replay screenshot #142

Merged
merged 10 commits into from
Jun 11, 2024
Merged

chore: replay screenshot #142

merged 10 commits into from
Jun 11, 2024

Conversation

marandaneto
Copy link
Member

@marandaneto marandaneto commented Jun 11, 2024

💡 Motivation and Context

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.


logger.info("Requesting beers list...")
URLSession.shared.dataTask(with: url) { _, _, _ in
// guard let url = URL(string: "https://api.punkapi.com/v2/beers") else {
Copy link
Member Author

Choose a reason for hiding this comment

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

this API does not exist anymore, the sample has to be changed

@marandaneto marandaneto marked this pull request as ready for review June 11, 2024 11:40
@marandaneto marandaneto requested a review from a team June 11, 2024 11:40
Comment on lines +289 to +290
// TODO: add debouncer with debouncerDelayMs to take into account how long it takes to execute the
// snapshot method
Copy link
Member Author

Choose a reason for hiding this comment

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

since you cannot offload this from the main thread, a debouncer mechanism would be handy, can be separated to PR to get this out of the door since the timer calls snapshot every 500ms already instead of for every frame

@@ -96,6 +96,8 @@
windowViews.setObject(snapshotStatus, forKey: view)
}

// TODO: IncrementalSnapshot, type=2
Copy link
Member Author

Choose a reason for hiding this comment

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

probably not needed if we make the screenshot the default option since it is always a single image anyway, unless at some point we try to optimize the data transfer by breaking a full image in tiles and only sending the ones that have changed.

Copy link
Member

@pauldambra pauldambra left a comment

Choose a reason for hiding this comment

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

👍 ⚡ 📷

PostHog/Replay/PostHogSessionReplayConfig.swift Outdated Show resolved Hide resolved
@marandaneto marandaneto merged commit dc7b837 into main Jun 11, 2024
6 checks passed
@marandaneto marandaneto deleted the chore/replay-screenshot branch June 11, 2024 16:09
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