Skip to content

RUM-1871 Reduced view update may miss hasReplay flag set before #2205

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 3 commits into from
Feb 26, 2025

Conversation

barboraplasovska
Copy link
Contributor

@barboraplasovska barboraplasovska commented Feb 26, 2025

What and why?

RUM backend has a special handling for hasReplay flag - once it is sent to true in any view update it cannot go back to false.

On the client side, however, we reduce the views, keeping only the last view update for a given viewId in the batch. If this view had originally hasReplay: true and then last view update has hasReplay:false (because by the time view update is sent session replay is disabled) we will miss session replay info for this view.

How?

Introduction of a new private attribute hasReplay in the RUMViewScope class that is set each time a new View event is built. In the case that it has once been set to true, each following RUMViewEvent that is created will keep hasReplay set to true.

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
  • Add Objective-C interface for public APIs (see our guidelines [internal]) and run make api-surface)

@barboraplasovska barboraplasovska self-assigned this Feb 26, 2025
@barboraplasovska barboraplasovska force-pushed the bplasovska/RUM-1871/hasReplay-update branch from a483791 to 2dcb6eb Compare February 26, 2025 14:28
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Feb 26, 2025

Datadog Report

Branch report: bplasovska/RUM-1871/hasReplay-update
Commit report: b787f69
Test service: dd-sdk-ios

✅ 0 Failed, 782 Passed, 3030 Skipped, 1m 6.49s Total duration (1m 26.48s time saved)

@barboraplasovska barboraplasovska marked this pull request as ready for review February 26, 2025 15:17
@barboraplasovska barboraplasovska requested review from a team as code owners February 26, 2025 15:17
maxep
maxep previously approved these changes Feb 26, 2025
Copy link
Member

@maxep maxep left a comment

Choose a reason for hiding this comment

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

To the point, very nice work 🎖️ 👍

mariedm
mariedm previously approved these changes Feb 26, 2025
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.

Looks great, nice job! 👏

@barboraplasovska barboraplasovska dismissed stale reviews from mariedm and maxep via b787f69 February 26, 2025 15:52
@barboraplasovska barboraplasovska merged commit 0153a68 into develop Feb 26, 2025
14 checks passed
@maxep maxep deleted the bplasovska/RUM-1871/hasReplay-update branch February 26, 2025 17:06
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