Skip to content

RUM-5389: Add API to configure the Image Privacy#2125

Merged
jonathanmos merged 2 commits into
developfrom
jmoskovich/rum-5389/image-recording-config
Jul 18, 2024
Merged

RUM-5389: Add API to configure the Image Privacy#2125
jonathanmos merged 2 commits into
developfrom
jmoskovich/rum-5389/image-recording-config

Conversation

@jonathanmos

@jonathanmos jonathanmos commented Jul 17, 2024

Copy link
Copy Markdown
Member

What does this PR do?

Link to the RFC

Adds an ImagePrivacy api to the SessionReplayConfiguration. The api has the following values:

MASK_ALL - no images will be recorded. Images will be replaced with a placeholder labelled "Image".
MASK_CONTENT - bundled images will be recorded and contextual ones will not (the default state). Contextual images will be replaced with a placeholder labelled "Content Image".
MASK_NONE - all images will be recorded.

Usage of the api:

SessionReplayConfiguration.Builder()
.setImagePrivacy(ImagePrivacy.MASK_ALL)

MASK_NONE
Screenshot 2024-07-17 at 9 40 31

MASK_CONTENT
Screenshot 2024-07-17 at 14 39 09

MASK_ALL
Screenshot 2024-07-17 at 14 36 48

Motivation

Give users the flexibility to have different image recording levels for their sessions.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@jonathanmos
jonathanmos force-pushed the jmoskovich/rum-5389/image-recording-config branch 2 times, most recently from 3225f69 to fe8bcf9 Compare July 17, 2024 08:08
@codecov-commenter

codecov-commenter commented Jul 17, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 97.77778% with 2 lines in your changes missing coverage. Please review.

Project coverage is 70.07%. Comparing base (fc53808) to head (c007451).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2125      +/-   ##
===========================================
+ Coverage    70.03%   70.07%   +0.05%     
===========================================
  Files          721      722       +1     
  Lines        26773    26847      +74     
  Branches      4499     4504       +5     
===========================================
+ Hits         18749    18813      +64     
- Misses        6771     6774       +3     
- Partials      1253     1260       +7     
Files Coverage Δ
.../com/datadog/android/sessionreplay/ImagePrivacy.kt 100.00% <100.00%> (ø)
...com/datadog/android/sessionreplay/SessionReplay.kt 90.00% <100.00%> (+1.11%) ⬆️
...ndroid/sessionreplay/SessionReplayConfiguration.kt 100.00% <100.00%> (ø)
.../sessionreplay/internal/DefaultRecorderProvider.kt 93.33% <100.00%> (+0.11%) ⬆️
...oid/sessionreplay/internal/SessionReplayFeature.kt 100.00% <100.00%> (ø)
...nreplay/internal/recorder/SessionReplayRecorder.kt 96.83% <100.00%> (+0.08%) ⬆️
...essionreplay/internal/recorder/SnapshotProducer.kt 91.89% <100.00%> (+0.98%) ⬆️
...nreplay/internal/recorder/ViewOnDrawInterceptor.kt 88.89% <100.00%> (ø)
...lay/internal/recorder/WindowCallbackInterceptor.kt 100.00% <100.00%> (ø)
...ternal/recorder/callback/RecorderWindowCallback.kt 91.46% <100.00%> (+0.44%) ⬆️
... and 9 more

... and 30 files with indirect coverage changes

@jonathanmos
jonathanmos force-pushed the jmoskovich/rum-5389/image-recording-config branch from fe8bcf9 to bb9aeca Compare July 17, 2024 11:35
@jonathanmos jonathanmos changed the title RUM-5389: Add API to configure the Image Recording Level RUM-5389: Add API to configure the Image Privacy Jul 17, 2024
@jonathanmos
jonathanmos force-pushed the jmoskovich/rum-5389/image-recording-config branch from bb9aeca to 1f40138 Compare July 17, 2024 11:48
@jonathanmos
jonathanmos marked this pull request as ready for review July 17, 2024 12:12
@jonathanmos
jonathanmos requested review from a team as code owners July 17, 2024 12:12

@ambushwork ambushwork left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@jonathanmos
jonathanmos requested review from 0xnm and mariusc83 July 18, 2024 08:09
@jonathanmos
jonathanmos merged commit 1ce4aa7 into develop Jul 18, 2024
@jonathanmos
jonathanmos deleted the jmoskovich/rum-5389/image-recording-config branch July 18, 2024 12:29
@xgouchet xgouchet added this to the 2.12.x milestone Jul 31, 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.

6 participants