-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fixed the code examples #24370
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
Open
WriteMayur
wants to merge
2
commits into
develop
Choose a base branch
from
settingsfix
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+21
−12
Open
fixed the code examples #24370
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -62,14 +62,14 @@ To display all static text (such as labels, buttons, and headings) and only mask | |||||||||
|
|
||||||||||
| 6. In the <DNT>User input masking</DNT> section, clear all checkboxes, including <DNT>Mask all user input</DNT> and the specific input type boxes. | ||||||||||
|
|
||||||||||
| 7. Add the `nr-mask` class or `data-nr-mask` attribute to specific sensitive inputs in your HTML code that you want to keep masked. For example, if you want to mask credit card numbers but show all other text, add `nr-mask` to the credit card input field: | ||||||||||
| 7. Add the `nr-ignore` class to specific sensitive inputs in your HTML code that you want to keep masked. For example, if you want to mask credit card numbers but show all other text, add `nr-ignore` to the credit card input field: | ||||||||||
|
|
||||||||||
| ```html | ||||||||||
| <!-- This will show normally --> | ||||||||||
| <label>Credit Card Number</label> | ||||||||||
|
|
||||||||||
| <!-- This will be masked --> | ||||||||||
| <input type="text" class="nr-mask" id="creditCard" placeholder="1234 5678 9012 3456"> | ||||||||||
| <input type="text" class="nr-ignore" id="creditCard" placeholder="1234 5678 9012 3456"> | ||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
| ``` | ||||||||||
|
|
||||||||||
| 8. Redeploy your app to apply the changes | ||||||||||
|
|
@@ -131,26 +131,35 @@ For example: | |||||||||
|
|
||||||||||
| ## Unmask static text [#unmask-text] | ||||||||||
|
|
||||||||||
| You can use unmask selectors to display specific static text elements without asterisks (\*). This is useful if you want to keep global masking enabled but need certain elements to remain visible. | ||||||||||
| By default, all static text is masked when you use recommended settings. If you want to explicitly unmask specific static text elements, you can add the `nr-unmask` class or `data-nr-unmask` attribute to that specific element. This is useful when you want to keep global masking enabled but need certain elements to remain visible. | ||||||||||
|
|
||||||||||
| To unmask specific text elements, follow these options: | ||||||||||
| <Callout variant="tip"> | ||||||||||
| You must use browser agent version 1.256.0 or higher to use the `nr-unmask` and `data-nr-unmask` selectors. | ||||||||||
| </Callout> | ||||||||||
|
|
||||||||||
| To unmask specific text elements, use one of the following options: | ||||||||||
|
|
||||||||||
| * In the <DNT>New Relic</DNT> platform: On the <DNT>**Application settings**</DNT> page, add CSS selectors to the <DNT>Mask selectors</DNT> field. To unmask all static text, clear this field. | ||||||||||
| * In your code: Add the `nr-unmask` CSS class or `data-nr-unmask` attribute to your HTML elements. | ||||||||||
|
|
||||||||||
| For example, to display a product name while other text remains masked: | ||||||||||
| For example, to display a product name while other text remains masked using: | ||||||||||
|
|
||||||||||
| * An inline CSS class: | ||||||||||
|
|
||||||||||
| ```html | ||||||||||
| <h1 class="nr-unmask">Product Name: Premium Widget</h1> | ||||||||||
| ``` | ||||||||||
| ```html | ||||||||||
| <p>Product Name: <span class="nr-unmask">Premium Widget</span></p> | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| * An inline data attribute: | ||||||||||
|
|
||||||||||
| ```html | ||||||||||
| <p>Product Name: <span data-nr-unmask>Premium Widget</span></p> | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| <Callout variant="tip"> | ||||||||||
| You must use browser agent version 1.256.0 or higher to use the `nr-unmask` and `data-nr-unmask` selectors. | ||||||||||
| </Callout> | ||||||||||
|
|
||||||||||
| ## Block site content [#block-content] | ||||||||||
|
|
||||||||||
| You can block entire sections of content on your site, which means the section will appear as an empty placeholder in session replay. For example, if you have an image on your About Us webpage and don’t need it captured, you could block the class containing the image. | ||||||||||
| You can block entire sections of content on your site, which means the section will appear as an empty placeholder in session replay. For example, if you have an image on your About Us webpage and don't need it captured, you could block the class containing the image. | ||||||||||
|
|
||||||||||
| To block specific classes or attributes, you have a few options: | ||||||||||
|
|
||||||||||
|
|
||||||||||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nr-mask(anddata-nr-mask) was the correct attribute before. The problem was that this attribute doesnt work forinputs. This should be reverted back tonr-mask/data-nr-mask. See next comment for clarity.