Hiding absolute paths in Sentry

Hello! I’ve set up Sentry with my Expo project according to the documentation here: https://docs.expo.io/versions/latest/guides/using-sentry.html. When logging errors, I currently see an entire absolute path in the transaction tag / stacktrace which includes the full name of my local directory on my machine (something like Users/MyFolder/…/file.js), making the interface extremely cluttered. I want to only show a shortened / relative path like ~/app/…/file.js. How do I go about doing this?

Hey @rino133,

I’m not sure. Try checking React Native | Sentry Documentation or https://github.com/getsentry/react-native-sentry

Thanks – I think more generally the question is how to change the path shown in a stack trace using expo to be a relative vs. absolute path? Do you have any ideas here?

this is unrelated to expo, it’s a sentry concern

@notbrent thanks for the reply. independent of sentry though, is there a way to hide the working directory information from the error stack trace?

hide it from where? the red box? exp / xde logs?

Yes, the red box. I am probably not describing the issue well, but more specifically I think it would entail skipping prefixes on filenames in the source maps.

this is the source of the redbox on ios: https://github.com/facebook/react-native/blob/master/React/Modules/RCTRedBox.m

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.