You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Android: native events are sent unfiltered when BeforeSend conversion fails #5764
On Android, when options.Native.EnableBeforeSend is on, a Java/NDK event that can't be converted to or from a managed SentryEvent is sent unfiltered.
BeforeSendCallback.Execute wraps the conversion (ToSentryEvent, ToHint, ToJavaSentryEvent) in a catch that logs and does return e;, so the original Java event goes out without the user's BeforeSend having run.
#5610 already made exceptions thrown by the user's callback drop the event (BeforeSendWrapper returns null), so conversion failures are now the only thing that reaches this catch. It should be consistent with that: return null so the Java SDK drops the event and records the client report.
Users who enable EnableBeforeSend usually do it to redact data from native events, so sending the raw event when filtering can't run defeats the purpose.
Activity
linear-code commentedon Oct 22, 2026
NET-882