Removing or obfuscating deviceID when using sentry with expo

Hi all,

Thanks for building an simple/amazing tool!

I am using sentry with react-native - expo specifically.

I have a requirement to not log deviceIDs in any third party services. So, as a first solution I tried setting “deviceId” in the global sensitive field configuration but that does not remove the deviceId from new issues. I double checked that this setting works for other fields and it does. Am I doing it wrong or is there a server side limitation to removing the deviceId from all data?

During my research I came accross beforeSend, which looks exactly what I would need to solve this problem on the client side - which is what I would prefer [1]. However, I can find no reference to beforeSend in sentry’s expo library or indeed its react-native library. If I missed or if I should be doing this differently in my case, I would love pointers to where to learn more!

[1] https://docs.sentry.io/error-reporting/configuration/filtering/?platform=browser