Skip to content

Latest commit

 

History

History
17 lines (15 loc) · 429 Bytes

File metadata and controls

17 lines (15 loc) · 429 Bytes

In JavaScript, you can use a function to modify the event or return a completely new one. If you return null, the event will be discarded.

Sentry.init({
  dsn: "___PUBLIC_DSN___",

  // Called for message and error events
  beforeSend(event) {
    // Modify or drop the event here
    if (event.user) {
      // Don't send user's email address
      delete event.user.email;
    }
    return event;
  },
});