Unable to use onSendCallback or add extra payload
claudiozam opened this issue · 2 comments
Hi, I want to add a some extra payload on catched / uncatched exceptions but onSendCallback is not working.
"react-native": "^0.61.5"
"rollbar-react-native": "^0.7.2"
Thanks
This looks like an issue in the react native code path for Rollbar.js.
Normally, when the default userCheckIgnore
predicate is used, onSendCallback
gets called from there:
https://github.com/rollbar/rollbar.js/blob/master/src/predicates.js#L15-L24
The React Native code path has its own userCheckIgnore
that doesn't include the call to onSendCallback
.
https://github.com/rollbar/rollbar.js/blob/master/src/react-native/predicates.js#L20-L34
This will need to be fixed in Rollbar.js, and then that fix pulled in to rollbar-react-native.
For updating the payload, I would have suggested the transform(payload)
callback, but I just looked and it won't get called either. This will also require an update in Rollbar.js.
A rollbar-react-native release is due soon, and I'll work on getting these changes in.
Fix released in v0.8.0. https://github.com/rollbar/rollbar-react-native/releases/tag/v0.8.0