|
1 | 1 | import { configureScope, logger } from '@sentry/core'; |
2 | 2 | import { Integration, SentryEvent } from '@sentry/types'; |
3 | 3 | import { isRegExp } from '@sentry/utils/is'; |
4 | | -import { BrowserOptions } from '../backend'; |
5 | 4 | import { getEventDescription } from '@sentry/utils/misc'; |
| 5 | +import { BrowserOptions } from '../backend'; |
6 | 6 |
|
7 | 7 | // "Script error." is hard coded into browsers for errors that it can't read. |
8 | 8 | // this is the result of a script being pulled in from an external domain and CORS. |
@@ -40,15 +40,25 @@ export class InboundFilters implements Integration { |
40 | 40 | /** JSDoc */ |
41 | 41 | public shouldDropEvent(event: SentryEvent): boolean { |
42 | 42 | if (this.isIgnoredError(event)) { |
43 | | - logger.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\n Event: ${getEventDescription(event)}`); |
| 43 | + logger.warn( |
| 44 | + `Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${getEventDescription(event)}`, |
| 45 | + ); |
44 | 46 | return true; |
45 | 47 | } |
46 | 48 | if (this.isBlacklistedUrl(event)) { |
47 | | - logger.warn(`Event dropped due to being matched by \`blacklistUrls\` option.\n Event: ${getEventDescription(event)}`); |
| 49 | + logger.warn( |
| 50 | + `Event dropped due to being matched by \`blacklistUrls\` option.\nEvent: ${getEventDescription( |
| 51 | + event, |
| 52 | + )}.\nUrl: ${this.getEventFilterUrl(event)}`, |
| 53 | + ); |
48 | 54 | return true; |
49 | 55 | } |
50 | 56 | if (!this.isWhitelistedUrl(event)) { |
51 | | - logger.warn(`Event dropped due to not being matched by \`whitelistUrls\` option.\n Event: ${getEventDescription(event)}`); |
| 57 | + logger.warn( |
| 58 | + `Event dropped due to not being matched by \`whitelistUrls\` option.\nEvent: ${getEventDescription( |
| 59 | + event, |
| 60 | + )}.\nUrl: ${this.getEventFilterUrl(event)}`, |
| 61 | + ); |
52 | 62 | return true; |
53 | 63 | } |
54 | 64 | return false; |
|
0 commit comments