Description
Integration
sentry
Java Version
any
Version
6.1.2
Steps to Reproduce
There are multiple places where an Exception thrown by a callback is not caught.
SentryAndroid.init
paramSentry.OptionsConfiguration<SentryAndroidOptions> configuration
- Local scope callback for
captureX
methods with paramScopeCallback callback
- ... there's probably more
Expected Result
Exceptions should be caught and we should downgrade gracefully (throw away an event, don't enable the SDK, ...).
Actual Result
Exceptions are not caught
Metadata
Metadata
Assignees
Type
Projects
Status
Done
Activity
philipphofmann commentedon Jun 23, 2022
If we decide to throw away the event, we should ensure this information ends up in client reports.
marandaneto commentedon Jun 24, 2022
Actually, it's the opposite, by swallowing the exception during eg
beforeSend
, we make sure that events get sent.markushi commentedon Oct 11, 2022
Potential callbacks which should not crash:
via
Sentry
init / OptionsConfiguration<T>.configure
via
Hub
withScope(..., ScopeCallback)
configureScope(..., ScopeCallback)
captureEvent(..., ScopeCallback)
captureMesssage(..., ScopeCallback)
captureException(..., ScopeCallback)
via
SentryOptions
BeforeSendCallback
called by SentryClient.captureEvent
BeforeBreadcrumbCallback
called by Scope.addBreadcrumb
TracesSamplerCallback
TracesSampler.sample
ProfilesSamplerCallback
TracesSampler.sample
Ignored for custom implementations of
Integration
ISentryClient
ILogger
IEnvelopeReader.read
IDebugImagesLoader
IEnvelopeCache
IEnvelopeReader
HostnameVerifier
SSLSocketFactory
ISerializer
ITransactionProfiler
ITransportFactory
ITransportGate
ISentryExecutorService
IScopeObserver
IClientReportRecorder
5 remaining items