-
-
Notifications
You must be signed in to change notification settings - Fork 461
Closed
Description
Spring Boot version 2.3.6. Sentry SDK version 3.2.0.
Implemented BeforeSendCallback to filter some exceptions from being forwarded to Sentry:
@Component
public class BeforeSendCallbackImpl implements BeforeSendCallback {
@Override
public SentryEvent execute(@NotNull SentryEvent event, @Nullable Object hint) {
var eventThrowable = event.getThrowable();
// ... some logic that deals with exception
return event;
}
}
The throwable object accessible from SentryEvent is ExceptionMechanismException wrapping the underlying exception thrown by the application. The ExceptionMechanismException is marked as @Internal though. There does not appear to be a way to access the underlying exception without peeking through internal class.
Metadata
Metadata
Assignees
Labels
No labels