pub fn with_sentry<F, T>(f: F) -> Option<T>where
    F: FnOnce(&Sentry) -> T,