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-6224 [Session Replay FGM] Create privacy overrides #2058

Open
wants to merge 5 commits into
base: mariedm/FGM-overrides
Choose a base branch
from

Conversation

mariedm
Copy link
Contributor

@mariedm mariedm commented Sep 19, 2024

What and why?

This PR introduces the ability to override Session Replay's fine-grained privacy settings (text and input, images, touches) at the view level. This allows customers to apply specific privacy levels to specific views, overriding the global privacy configuration, enabling customers to control masking at a more granular level.

A new HiddenPrivacyLevel is also introduced, which, when applied to a view, will replace the view with an opaque wireframe and prevent any interactions or subviews from being recorded. This privacy level is only available as an override and takes precedence over other privacy settings.

How?

  • Created a HiddenPrivacyLevel enum
  • Added a SessionReplayOverride struct to encapsulate all overrideable privacy settings
  • Created an extension for UIView to access SessionReplayOverride via the .dd.sessionReplayOverride property
  • Used associated objects to store the privacy overrides for each view
  • Created a separate set of enums for override properties for Objective-C compatibility, to mimic nil values in Swift

Note: This PR only creates the new properties; the logic to apply the overrides will follow in another 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

@mariedm mariedm changed the title RUM 6224 create overrides RUM 6224 [Session Replay FGM] Create privacy overrides Sep 19, 2024
@mariedm mariedm changed the base branch from develop to mariedm/FGM-overrides September 19, 2024 12:58
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Sep 19, 2024

Datadog Report

Branch report: RUM-6224-create-overrides
Commit report: e0e5b6b
Test service: dd-sdk-ios

✅ 0 Failed, 3478 Passed, 0 Skipped, 3m 43.5s Total Time
🔻 Test Sessions change in coverage: 7 decreased, 3 increased, 4 no change

🔻 Code Coverage Decreases vs Default Branch (7)

This report shows up to 5 code coverage decreases.

  • test DatadogInternalTests iOS 79.33% (-0.16%) - Details
  • test DatadogTraceTests iOS 54.02% (-0.15%) - Details
  • test DatadogLogsTests iOS 47.65% (-0.13%) - Details
  • test DatadogWebViewTrackingTests iOS 18.51% (-0.07%) - Details
  • test DatadogRUMTests iOS 81.04% (-0.07%) - Details

@mariedm mariedm marked this pull request as ready for review September 20, 2024 09:28
@mariedm mariedm requested review from a team as code owners September 20, 2024 09:28
@mariedm mariedm changed the title RUM 6224 [Session Replay FGM] Create privacy overrides RUM-6224 [Session Replay FGM] Create privacy overrides Sep 20, 2024
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.

1 participant