[Sentry Replay] the class must be added from html or can be added via the ngOnInit or directive #7316
Replies: 3 comments 5 replies
-
need to know how exactly your library will get DOM snapshots |
Beta Was this translation helpful? Give feedback.
-
Hi @expcapitaldev , you can provide two kinds of privacy configuration: Masking and Blocking. To summarize:
You can add In addition, you can also configure more selectors to mask/block like this: new Replay({
block: ['.block-this-class', '[block-this-attr]'],
mask: ['.mask-this-class', '[mask-this-attr]']
}) Note that the defaults ( With masking, the rendered HTML would be e.g.: <div>
<div>My name:</div>
<div data-sentry-mask>Francesco</div>
</div> becomes <div>
<div>My name:</div>
<div data-sentry-mask>*********</div>
</div> With blocking, it would become: <div>
<div>My name:</div>
<div data-sentry-block></div> <!-- This would be sized to take up the same space as it did originally -->
</div> All of this masking/blocking happens client side, so data is already sent masked/blocked to the server. You can use any CSS selectors for mask/block, so also something like I hope this helped understand how this works! |
Beta Was this translation helpful? Give feedback.
-
Just to add to this, as long as your |
Beta Was this translation helpful? Give feedback.
-
for sentry replay we have policy, but can we use directive via
or html should be renderer
Beta Was this translation helpful? Give feedback.
All reactions