Sentry + LogRocket setup

Hey all,

I’ve been thinking if there’s a way to use the Expo implementation of Sentry, and still hook up to LogRocket?

A quick read of their blog post here says that one needs to attatch a callback to the Raven instance that Sentry uses - but since the Expo package wraps that instance (as far as I understand), there needs to be a way to either retrieve that raven client instance, or make a call a la “addLogRocketToRavenWithConfig(config)” to the Expo-Sentry package.

How would I go about such a thing? Any ideas? :slight_smile:

Sentry has already created middleware for logging Redux state with the Raven client here, but again - One needs the Raven client instance to hook it up.

The Expo package for Sentry currently configures the global Sentry instance instead of wrapping it. (This isn’t part of the public API and might change, but you could pin the version of sentry-expo in your package.json if it were to change.)

Reading the code is probably the best way to understand what’s going on with sentry-expo. It’s just one file anyway: GitHub - expo/sentry-expo

I’m not familiar with LogRocket but hopefully reading the sentry-expo code should give you an idea of how you could add LogRocket to Sentry. If you figure it out I’d be interested to hear your solution.

hi there! LogRocket doesn’t support react-native right now (although it is on their roadmap), I just asked them through the intercom chat on their site. that said, I modified sentry-expo to be compatible with it when it does. just call Sentry.setDataCallback as suggested in the blog post