stayallive / wp-sentry

A (unofficial) WordPress plugin reporting PHP and JavaScript errors to Sentry.
https://wordpress.org/plugins/wp-sentry-integration/
MIT License
305 stars 48 forks source link

ignoreErrors and ignoreUrls support? #85

Closed kkmuffme closed 3 years ago

kkmuffme commented 3 years ago

1) is wp_sentry.blacklistUrls the same as sentry native ignoreUrls ?

2) is there support for sentry ignoreErrors, e.g. via wp_sentry.ignoreErrors?

stayallive commented 3 years ago

Hi @kkmuffme, I'm assumin you are talking about the Browser/JavaScript integration here?

https://docs.sentry.io/platforms/javascript/configuration/filtering/#decluttering-sentry

In the readme we have a whole section on how to pass those configuration options:

https://github.com/stayallive/wp-sentry#wp_sentry_public_options-array

Let me know if that works and if not show me what you tried :)

kkmuffme commented 3 years ago

Thanks. It's also possible using the wp_sentry_hook function though, isn't it? (and setting wp_sentry.ignoreErrors = [...])

P.s: I was just asking, since I think I found a bug in the sentry SDK, but wasn't aware of that at the time of creating the question.

stayallive commented 3 years ago

It is possible with this: https://github.com/stayallive/wp-sentry#advanced-client-side-hook.

You can set things on the options manually there.

We include version 6.2.0 of the Browser SDK at the moment, so if there is a bug with that version it could possibly already be solved in a later version I have not yet included.