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
SentryAndroid does call installDefaultIntegrations in init Method.
There are some integrations included that are not "the best" choice for my use case.
(SendCachedEventFireAndForgetIntegration and EnvelopeFileObserverIntegration I suppose).
The workflow I do want to achieve is following (assuming #1739 is closed by the time):
First, init SentryAndroid framework, so breadcrumbs are collected
Do not send any events automatically!
Check if there was a crash during last app run
If there was, ask the user what to do with the crash event
If the user wants to send the cached event, send it. Otherwise just delete the event from the cache.
Sadly, because of coupling SentryAndroid.init with SendCachedEventFireAndForgetIntegration, the crash reports are being sent once the app was started after crash. So it's impossible to achieve step 2. having done step 1., isn't it?
Could the initialisation of the framework (that is initialisation of collecting breadcrumbs etc.) be decoupled from sending the cached events? And could sending the events be made "on-demand"?
I assume it's impossible because of coupling SendCachedEventFireAndForgetIntegration integration's register method to submitting sending tasks, isn't it? And there is no clean way to enable/disable it on demand.
It might be way of doing it by implementing custom TransportGate, but how to invoke SendCachedEventFireAndForgetIntegration later, once we need to send the event? (see point 5.)
Also sending the crash event should not be done after the crash, by on-demand on the next start of the app (UncaughtExceptionHandlerIntegration seems to do the opposite by default?)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
SentryAndroid does call
installDefaultIntegrations
ininit
Method.There are some integrations included that are not "the best" choice for my use case.
(
SendCachedEventFireAndForgetIntegration
andEnvelopeFileObserverIntegration
I suppose).The workflow I do want to achieve is following (assuming #1739 is closed by the time):
Sadly, because of coupling
SentryAndroid.init
withSendCachedEventFireAndForgetIntegration
, the crash reports are being sent once the app was started after crash. So it's impossible to achieve step 2. having done step 1., isn't it?Could the initialisation of the framework (that is initialisation of collecting breadcrumbs etc.) be decoupled from sending the cached events? And could sending the events be made "on-demand"?
I assume it's impossible because of coupling
SendCachedEventFireAndForgetIntegration
integration'sregister
method to submitting sending tasks, isn't it? And there is no clean way to enable/disable it on demand.It might be way of doing it by implementing custom
TransportGate
, but how to invokeSendCachedEventFireAndForgetIntegration
later, once we need to send the event? (see point 5.)Also sending the crash event should not be done after the crash, by on-demand on the next start of the app (
UncaughtExceptionHandlerIntegration
seems to do the opposite by default?)Maybe it's worth opening an issue for that?
Beta Was this translation helpful? Give feedback.
All reactions