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
And perhaps we should implement a better version of close and Sentry.initialize? 🤔
Specifically:
We don't erase hub variables, @background_worker and @session_flusher
Sentry.initialize? is backed by a simple boolean state that's changed by Sentry.ini and Sentry.close.
We would still need Sentry.initialize? in some places to stop some actions after the SDK is closed, but we don't need it for preventingnil value anymore, which is getting out of hand IMO.
And just having this change wouldn't reduce any of those checks as we usually do Sentry.foo.bar, where as long as Sentry.foo returns nil, we'd still see the same error.
So to actually achieve the goal, we need to ensure the data flow is not interrupted after Sentry.close and just block event-sending:
Return nil if the SDK is not initialized at all
Perform the action if the SDK is initialized
Perform the action if the SDK is closed
In this case, Client should block the event sending
It'd avoid all the Sentry.initialized? checks added above issues because they're already behind other initialization checks.
And perhaps we should implement a better version of
close
andSentry.initialize?
🤔Specifically:
@background_worker
and@session_flusher
Sentry.initialize?
is backed by a simple boolean state that's changed bySentry.ini
andSentry.close
.We would still need
Sentry.initialize?
in some places to stop some actions after the SDK is closed, but we don't need it for preventingnil
value anymore, which is getting out of hand IMO.Originally posted by @st0012 in #2084 (comment)
The text was updated successfully, but these errors were encountered: