You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/collections/_documentation/platforms/javascript/index.md
+19-7Lines changed: 19 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -594,17 +594,29 @@ Sentry.init({
594
594
595
595
The first thing to do is consider constructing a whitelist of domains which might raise acceptable exceptions.
596
596
597
-
If your scripts are loaded from `cdn.example.com` and your site is `example.com` it’d be reasonable to set `whitelistUrls` to:
597
+
If your scripts are loaded from `cdn.example.com` and your site is `example.com` it’d be reasonable to set `allowUrls` to:
598
598
599
599
```javascript
600
600
Sentry.init({
601
-
whitelistUrls: [
601
+
allowUrls: [
602
602
/https?:\/\/((cdn|www)\.)?example\.com/
603
603
]
604
604
});
605
605
```
606
606
607
-
There is also `blacklistUrls` if you want to block specific URLs forever.
607
+
There is also `denyUrls` if you want to block specific URLs forever.
608
+
609
+
{% capture __alert %}
610
+
Prior to version 5.17.0, `allowUrls` and `denyUrls` were called `whitelistUrls` and `blacklistUrls` respectively.
611
+
These options are still supported due to backward compatibility reasons, however, they will be removed in version 6.0.
612
+
For more information, please see our [Inclusive Language Policy](https://develop.sentry.dev/inclusion/).
613
+
{% endcapture %}
614
+
615
+
{% include components/alert.html
616
+
title="Note"
617
+
content=__alert
618
+
level="warning"
619
+
%}
608
620
609
621
The community has compiled a list of common ignore rules for everyday things, like Facebook, Chrome extensions, etc. So it’s recommended to at least check these out and see if they apply to you. [Here is the original gist](https://gist.github.com/impressiver/5092952). This is not the default value of our SDK; it's just a highlight of an extensive example of what it could be.
610
622
@@ -633,7 +645,7 @@ Sentry.init({
633
645
// See http://toolbar.conduit.com/Developer/HtmlAndGadget/Methods/JSInjection.aspx
634
646
'conduitPage'
635
647
],
636
-
blacklistUrls: [
648
+
denyUrls: [
637
649
// Facebook flakiness
638
650
/graph\.facebook\.com/i,
639
651
// Facebook blocked
@@ -767,10 +779,10 @@ to `integrations` option. For example, to turn off browser capturing console cal
This integration allows developers to ignore specific errors based on the type or message, as well as blacklist/whitelist URLs that originate from the exception.
771
-
It ignores errors, which message starts with `Script error` or `Javascript error: Script error` by default. More on this in our ["What the heck is "Script error"?"](https://blog.sentry.io/2016/05/17/what-is-script-error) blog post. Also, keep in mind that blacklist and whitelist work only for captured exceptions, not raw message events.
782
+
This integration allows developers to ignore specific errors based on the type or message, as well as deny/allow URLs that originate from the exception.
783
+
It ignores errors, which message starts with `Script error` or `Javascript error: Script error` by default. More on this in our ["What the heck is "Script error"?"](https://blog.sentry.io/2016/05/17/what-is-script-error) blog post. Also, keep in mind that denying and allowing specific events, work only for captured exceptions, not raw message events.
772
784
773
-
To configure the integration, use `ignoreErrors`, `blacklistUrls`, and `whitelistUrls` SDK options directly. All three options accept an array of strings or RegExp patterns. When provided with a string, they’ll partially match the URL in case of `backlistUrls` and `whitelistUrl`, or two variants in case of `ignoreErrors` - `message` itself, and `${type}: {message}` format. When given RegExp, it will use the `RegExp.test` method instead, which you can use to achieve an exact match if desired.
785
+
To configure the integration, use `ignoreErrors`, `denyUrls`, and `allowUrls` SDK options directly. All three options accept an array of strings or RegExp patterns. When provided with a string, they’ll partially match the URL in case of `denyUrls` and `allowUrls`, or two variants in case of `ignoreErrors` - `message` itself, and `${type}: {message}` format. When given RegExp, it will use the `RegExp.test` method instead, which you can use to achieve an exact match if desired.
0 commit comments