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-6566: Extract privacy error handling #2335

Closed

Conversation

jonathanmos
Copy link
Contributor

What does this PR do?

Extracts the error handling for privacy into it's own class, as preparation for sharing this logic with touch privacy.

Motivation

Part of the fine grained masking effort.

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)

@codecov-commenter
Copy link

codecov-commenter commented Oct 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.39%. Comparing base (774c798) to head (1972959).
Report is 12 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2335      +/-   ##
===========================================
- Coverage    70.41%   70.39%   -0.02%     
===========================================
  Files          739      740       +1     
  Lines        27536    27537       +1     
  Branches      4614     4614              
===========================================
- Hits         19388    19382       -6     
- Misses        6866     6870       +4     
- Partials      1282     1285       +3     
Files with missing lines Coverage Δ
...og/android/sessionreplay/internal/PrivacyHelper.kt 100.00% <100.00%> (ø)
...essionreplay/internal/recorder/SnapshotProducer.kt 95.08% <100.00%> (-0.44%) ⬇️

... and 32 files with indirect coverage changes

@jonathanmos jonathanmos marked this pull request as ready for review October 21, 2024 12:07
@jonathanmos jonathanmos requested review from a team as code owners October 21, 2024 12:07

import com.datadog.android.api.InternalLogger

internal class PrivacyHelper(private val internalLogger: InternalLogger) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

❔ question: ‏ Are we creating this helper only for this purpose ? Seems a bit too much for me, can't we find a different way to share this code ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Potentially this class could hold additional common logic in the future, and I don't see a better place at the moment to put this. Let's discuss

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think instead of creating one class and one instance for this I would rather have this call duplicated in those classes. I am waiting to see what the others are saying also.

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.

4 participants