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

RUMM-2423 Add the Sesion Replay MASK_ALL/ALLOW_ALL privacy strategies #1035

Conversation

mariusc83
Copy link
Member

What does this PR do?

A brief description of the change being made with this pull request.

Motivation

What inspired you to submit this pull request?

Additional Notes

Anything else we should know when reviewing?

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)

@mariusc83 mariusc83 force-pushed the mconstantin/rumm-2424/add-session-replay-v0-privacy-rules branch from 4efca7e to 51760c2 Compare September 7, 2022 14:53
@mariusc83 mariusc83 marked this pull request as ready for review September 7, 2022 14:54
@mariusc83 mariusc83 requested a review from a team as a code owner September 7, 2022 14:54
@mariusc83 mariusc83 self-assigned this Sep 7, 2022
@xgouchet xgouchet added the size-medium This PR is medium sized label Sep 7, 2022
ALLOW_ALL,

/**
* Masks all the elements. All the characters in texts will be replaced by X, images will be
Copy link
Member

Choose a reason for hiding this comment

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

Not a native speaker, but can we use plural form texts here? @fuzzybinary can you check?

) : TextWireframeMapper(viewWireframeMapper) {

override fun resolveTextValue(textView: TextView): String {
return String(CharArray(textView.text.length) { CHARACTER_MASK })
Copy link
Member

Choose a reason for hiding this comment

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

question: should we keep spaces at least as is? how browser SR does when applying this mask?

Copy link
Member Author

Choose a reason for hiding this comment

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

I am not sure we can do this as it will affect layout. It is kind of a wait and see situations. After some tests on different apps probably we will apply some adjustments.

right = this.totalPaddingEnd.densityNormalized(pixelsDensity).toLong()
top = textView.totalPaddingTop.densityNormalized(pixelsDensity).toLong(),
bottom = textView.totalPaddingBottom.densityNormalized(pixelsDensity).toLong(),
left = textView.totalPaddingStart.densityNormalized(pixelsDensity).toLong(),
Copy link
Member

Choose a reason for hiding this comment

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

won't we have any issues with RTL layout where start is on the right? How SR handles RTL btw?

Copy link
Member Author

Choose a reason for hiding this comment

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

We're not there yet ;)

@ParameterizedTest
@MethodSource("textTypefaces")
fun `M resolve a TextWireframe W map() { TextView with fontStyle }`(
typeface: Typeface,
Copy link
Member

Choose a reason for hiding this comment

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

minor: let's rename to fakeTypeface for the consistency and avoid a possible confusion when this is not specified explicitly.

Base automatically changed from mconstantin/rumm-2423/snapshot-processor-compute-mutations to feature/session-replay-vo September 8, 2022 07:40
@mariusc83 mariusc83 force-pushed the mconstantin/rumm-2424/add-session-replay-v0-privacy-rules branch from 51760c2 to 539775c Compare September 8, 2022 08:06
@mariusc83 mariusc83 requested a review from 0xnm September 9, 2022 08:40
@codecov-commenter
Copy link

codecov-commenter commented Sep 9, 2022

Codecov Report

Merging #1035 (539775c) into feature/session-replay-vo (e6ffd2a) will increase coverage by 0.10%.
The diff coverage is 95.08%.

@@                      Coverage Diff                      @@
##           feature/session-replay-vo    #1035      +/-   ##
=============================================================
+ Coverage                      83.22%   83.32%   +0.10%     
=============================================================
  Files                            323      327       +4     
  Lines                          10424    10454      +30     
  Branches                        1734     1737       +3     
=============================================================
+ Hits                            8675     8710      +35     
+ Misses                          1210     1208       -2     
+ Partials                         539      536       -3     
Impacted Files Coverage Δ
...play/recorder/mapper/MaskAllTextWireframeMapper.kt 80.00% <80.00%> (ø)
...ssionreplay/recorder/mapper/TextWireframeMapper.kt 90.16% <81.82%> (+0.51%) ⬆️
...nreplay/recorder/mapper/AllowAllWireframeMapper.kt 83.33% <83.33%> (ø)
...onreplay/recorder/mapper/MaskAllWireframeMapper.kt 83.33% <83.33%> (ø)
...g/android/sessionreplay/processor/NodeFlattener.kt 91.30% <91.30%> (ø)
...atadog/android/core/configuration/Configuration.kt 98.43% <100.00%> (+0.03%) ⬆️
...oid/sessionreplay/internal/SessionReplayFeature.kt 96.00% <100.00%> (ø)
.../kotlin/com/datadog/android/v2/core/DatadogCore.kt 69.40% <100.00%> (+0.46%) ⬆️
...id/sessionreplay/SessionReplayLifecycleCallback.kt 96.43% <100.00%> (+0.13%) ⬆️
...adog/android/sessionreplay/SessionReplayPrivacy.kt 100.00% <100.00%> (ø)
... and 12 more

@mariusc83 mariusc83 merged commit e9cae1d into feature/session-replay-vo Sep 12, 2022
@mariusc83 mariusc83 deleted the mconstantin/rumm-2424/add-session-replay-v0-privacy-rules branch September 12, 2022 07:37
@xgouchet xgouchet added this to the internal milestone Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size-medium This PR is medium sized
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants