Is possible to filters errors by browser.name or "stacktrace frames module"

Hello,
I want to know if:

  • is possible to filters errors raise by “WebView” browser
  • to filter errors raise from a specific module

I implemented this, but it seems not found:

  beforeSend(event) {
    try {
      // Avoid send error from webview,
      const browser = event.contexts?.browser?.name as string | undefined;
      if (browser && browser.includes('WebView')) {
        return null;
      }
      // ADV chunk load failed,
      const firstStackTrace =
        event.exception?.values?.[0].stacktrace?.frames?.[0].module;
      const ignoreWords = ['pulse-sdk'];
      if (
        firstStackTrace &&
        ignoreWords.some((w) => firstStackTrace.includes(w))
      ) {
        return null;
      }
    } catch (e) {
      console.error('beforeSend sentry error', e);
    }
    return event;
  },