Skip to content

Disable log.error to be sent as Issues #3890

Answered by adinauer
sebasira asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @sebasira , you could filter events in beforeSend. Heres some docs for it. The easiest way to register it for a Spring Boot application is to register a bean:

  @Bean
  public SentryOptions.BeforeSendCallback beforeSendCallback() {
    return ((event, hint) -> {
      if (event.getLogger() != null) {
        return null;
      }
      return event;
    });
  }

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by sebasira
Comment options

You must be logged in to vote
2 replies
@adinauer
Comment options

@sebasira
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants