Switch to `PanicHookInfo` in `sentry-panic`
Description
The MSRV for this crate is 1.81, we should use PanicHookInfo instead of PanicInfo which is deprecated.
Also check if there's anything else deprecated that we're using that we could switch from.
Given that you setup panic hooks. Is it safe to drop ClientInitGuard at runtime in order to disable Sentry and then initialize a new instance of Sentry later on to re-enable it? Asking because I'd like to find a way to enable/disable Sentry dynamically without restarting the process. I am not certain that this is handled gracefully wrt panic hook especially if something else in the app wraps the installed panic hook.
Hi @pronebird, yeah that's safe to do. What happens if you drop the client init guard is that the panic hook will remain installed, but will effectively be a no-op if a panic happens. Then when you reinitialize, a client will be active and so the panic will be captured. Of course this works if your app properly wraps the panic hook from Sentry instead of completely replacing it.