Closed stefs7 closed 2 years ago
I think it might be better to actually exclude errors from third-party plugins if you are not interested in them?
See: https://github.com/stayallive/wp-sentry#capturing-errors-only-from-certain-theme-andor-plugin
If you wanted you can use the same code example to ignore errors when is_admin()
is true
:
add_filter( 'wp_sentry_options', function ( \Sentry\Options $options ) {
$options->setBeforeSendCallback( function ( \Sentry\Event $event ) {
return is_admin() ? null : $event;
} );
} );
Note: the wp_sentry_options
filter fires on the WordPress after_setup_theme
action so make sure to register your filter before that for example in the functions.php
of your theme.
I am closing this issue because of inactivity, if there is still an issue please re-open / open a new issue so we can investigate 👍
This feature would allow to exclude errors origin from third-party plugin's which have a high chance of producing errors in the WP Admin.