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

fix: Session Replay text masking for whitespace #1416

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ptang-nr
Copy link
Contributor

@ptang-nr ptang-nr commented Mar 15, 2025

There is an edge case where whitespace was being masked, which interferes with the layout/styling in session replays.

Overview

In this PR, we address the edge case by allowing the whitespace to return as-is when it's not a password field.

Related Issue(s)

https://new-relic.atlassian.net/browse/NR-379491

Testing

Added unit test for customMasker function
Manually tested session replay on customer's site using rrweb REPL

Copy link

Asset Size Report

Merging this pull request will result in the following asset size changes:

Agent Asset Previous Size New Size Diff
lite loader 30.54 kB / 11.06 kB (gzip) 30.54 kB / 11.06 kB (gzip) 0% / 0% (gzip)
lite async-chunk 52.72 kB / 17.21 kB (gzip) 52.72 kB / 17.21 kB (gzip) 0% / 0% (gzip)
pro loader 52.63 kB / 18.13 kB (gzip) 52.92 kB / 18.24 kB (gzip) 0.55% / 0.63% (gzip)
pro async-chunk 101.18 kB / 30.86 kB (gzip) 101.18 kB / 30.86 kB (gzip) 0% / 0% (gzip)
spa loader 60.24 kB / 20.45 kB (gzip) 60.53 kB / 20.57 kB (gzip) 0.48% / 0.58% (gzip)
spa async-chunk 115.89 kB / 35.21 kB (gzip) 115.89 kB / 35.21 kB (gzip) 0% / 0% (gzip)

Copy link

codecov bot commented Mar 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.73%. Comparing base (1832562) to head (3fe1720).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1416      +/-   ##
==========================================
- Coverage   88.73%   88.73%   -0.01%     
==========================================
  Files         170      170              
  Lines        7442     7446       +4     
  Branches     1509     1511       +2     
==========================================
+ Hits         6604     6607       +3     
- Misses        730      731       +1     
  Partials      108      108              
Flag Coverage Δ
integration-tests 90.86% <100.00%> (-0.04%) ⬇️
unit-tests 80.04% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

github-actions bot commented Mar 17, 2025

Static Badge

Last ran on March 17, 2025 11:54:36 CDT
Checking merge of (3fe1720) into main (1832562)

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.

2 participants