Skip to content

Session Replay Privacy do not work as expected, sentry-mask show full text after changes #7257

Closed
@expcapitaldev

Description

@expcapitaldev

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using? If you use the CDN bundles, please specify the exact bundle (e.g. bundle.tracing.min.js) in your SDK setup.

@sentry/angular

SDK Version

7.37.1

Framework Version

"@sentry/angular": "7.37.1",

Link to Sentry event

https://currencycom.sentry.io/replays/trading-web-cc-test:dc26c4e893224c83bf227220b3baafdd/?project=5963475&query=&referrer=%2Freplays%2F&statsPeriod=1h&yAxis=count%28%29

SDK Setup

Sentry.init({
  dns: myDNS,
  // set to 1 so once we add the integration, it will def. be sampled
  replaysSessionSampleRate: 1,
  replaysOnErrorSampleRate: 1,
  integrations: []; // not added here
});

 // enableReplay for example from variable from server
async function toggleReplay(enableReplay){
  const client: Client | undefined = Sentry.getCurrentHub().getClient();
  if (!client) {
    return;
  }
  const existingReplay = client.getIntegration(Replay);
  if (enableReplay) {
  
    if (existingReplay) {
      return;
    }
    const replay = new Replay();
    client.addIntegration(replay);
  } else {
     if (existingReplay) {
      await replay.flush();
   replay.stop();
     }
   
  }
}

Steps to Reproduce

  1. add sentry-mask css class to input with ngModel or/and to div wrapper
  2. change input
  3. see your session

Expected Result

Privacy data should have mask after initialization Sentry and after changes

Actual Result

after Sentry init we see mask "*" but after changes we see original text, class did not removed from input/div
(sentry-ignore the same, only sentry-block works as expected)
Pls recheck from your side

Metadata

Metadata

Assignees

Labels

Package: replayIssues related to the Sentry Replay SDK

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions