Integration
sentry-android
Build System
Gradle
AGP Version
9.3.1
Proguard
Enabled
Other Error Monitoring Solution
Firebase Crashlytics
Version
8.50.1
Steps to Reproduce
When capturing an event with ERROR level but without an Exception attached, the SentryReplayOptions.BeforeErrorSamplingCallback is not firing.
Assistance from an LLM pointed that the logic in SentryClient.captureEvent() requires the event to have at least one exception attached for this callback to be fired.
I'm more interested to know if that's intended or not. We have valid usecases where we want to capture custom error events and filter them for error-session-replays (via SentryReplayOptions.BeforeErrorSamplingCallback as your docs suggest), but we are forced to attach an Exception to the event in order to achieve this.
FYI we are using SentryTimberIntegration.
Expected Result
The SentryReplayOptions.BeforeErrorSamplingCallback to fire regardless if there is an exception attached or not.
Actual Result
SentryReplayOptions.BeforeErrorSamplingCallback is not firing unless there is an Exception attached
Integration
sentry-android
Build System
Gradle
AGP Version
9.3.1
Proguard
Enabled
Other Error Monitoring Solution
Firebase Crashlytics
Version
8.50.1
Steps to Reproduce
When capturing an event with ERROR level but without an Exception attached, the
SentryReplayOptions.BeforeErrorSamplingCallbackis not firing.Assistance from an LLM pointed that the logic in SentryClient.captureEvent() requires the event to have at least one exception attached for this callback to be fired.
I'm more interested to know if that's intended or not. We have valid usecases where we want to capture custom error events and filter them for error-session-replays (via
SentryReplayOptions.BeforeErrorSamplingCallbackas your docs suggest), but we are forced to attach an Exception to the event in order to achieve this.FYI we are using
SentryTimberIntegration.Expected Result
The
SentryReplayOptions.BeforeErrorSamplingCallbackto fire regardless if there is an exception attached or not.Actual Result
SentryReplayOptions.BeforeErrorSamplingCallbackis not firing unless there is an Exception attached