{"action":"created","issue":{"url":"https://api.github.com/repos/getsentry/sentry-javascript/issues/1551","repository_url":"https://api.github.com/repos/getsentry/sentry-javascript","labels_url":"https://api.github.com/repos/getsentry/sentry-javascript/issues/1551/labels{/name}","comments_url":"https://api.github.com/repos/getsentry/sentry-javascript/issues/1551/comments","events_url":"https://api.github.com/repos/getsentry/sentry-javascript/issues/1551/events","html_url":"https://github.com/getsentry/sentry-javascript/issues/1551","id":361919723,"node_id":"MDU6SXNzdWUzNjE5MTk3MjM=","number":1551,"title":"Missing Sentry.setDataCallback","user":{"login":"pkuczynski","id":374864,"node_id":"MDQ6VXNlcjM3NDg2NA==","avatar_url":"https://avatars1.githubusercontent.com/u/374864?v=4","gravatar_id":"","url":"https://api.github.com/users/pkuczynski","html_url":"https://github.com/pkuczynski","followers_url":"https://api.github.com/users/pkuczynski/followers","following_url":"https://api.github.com/users/pkuczynski/following{/other_user}","gists_url":"https://api.github.com/users/pkuczynski/gists{/gist_id}","starred_url":"https://api.github.com/users/pkuczynski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkuczynski/subscriptions","organizations_url":"https://api.github.com/users/pkuczynski/orgs","repos_url":"https://api.github.com/users/pkuczynski/repos","events_url":"https://api.github.com/users/pkuczynski/events{/privacy}","received_events_url":"https://api.github.com/users/pkuczynski/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-19T20:43:12Z","updated_at":"2018-09-20T07:36:42Z","closed_at":"2018-09-20T07:36:42Z","author_association":"CONTRIBUTOR","body":"<!-- Requirements: please go through this checklist before opening a new issue -->\r\n\r\n- [x] Review the documentation: https://docs.sentry.io/\r\n- [x] Search for existing issues: https://github.com/getsentry/sentry-javascript/issues\r\n- [x] Use the latest release: https://github.com/getsentry/sentry-javascript/releases\r\n\r\n## Package + Version\r\n\r\n- [x] `@sentry/browser`\r\n- [ ] `@sentry/node`\r\n- [ ] `raven-js`\r\n- [ ] `raven-node` _(raven for node)_\r\n- [ ] other:\r\n\r\n### Version:\r\n\r\n```\r\n4.0.2\r\n```\r\n\r\n## Description\r\n\r\nThe previous version `raven-js` had the ability to add `setDataCallback` which was executed before data was sent out. Current version `@sentry/browser` enables `beforeSend` but it can be only set as part of the `init` process.\r\n\r\nCould you please add an ability to set `beforeSend` callback also in a later stage? I am trying to fix my redux integration previously done using `https://github.com/captbaritone/raven-for-redux/blob/master/index.js`"},"comment":{"url":"https://api.github.com/repos/getsentry/sentry-javascript/issues/comments/423073872","html_url":"https://github.com/getsentry/sentry-javascript/issues/1551#issuecomment-423073872","issue_url":"https://api.github.com/repos/getsentry/sentry-javascript/issues/1551","id":423073872,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzA3Mzg3Mg==","user":{"login":"HazAT","id":363802,"node_id":"MDQ6VXNlcjM2MzgwMg==","avatar_url":"https://avatars2.githubusercontent.com/u/363802?v=4","gravatar_id":"","url":"https://api.github.com/users/HazAT","html_url":"https://github.com/HazAT","followers_url":"https://api.github.com/users/HazAT/followers","following_url":"https://api.github.com/users/HazAT/following{/other_user}","gists_url":"https://api.github.com/users/HazAT/gists{/gist_id}","starred_url":"https://api.github.com/users/HazAT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HazAT/subscriptions","organizations_url":"https://api.github.com/users/HazAT/orgs","repos_url":"https://api.github.com/users/HazAT/repos","events_url":"https://api.github.com/users/HazAT/events{/privacy}","received_events_url":"https://api.github.com/users/HazAT/received_events","type":"User","site_admin":false},"created_at":"2018-09-20T07:36:42Z","updated_at":"2018-09-20T07:36:42Z","author_association":"MEMBER","body":"Hey, you should be able to use an event processor.\r\n\r\nSo in any point in time you can do:\r\n\r\n```js\r\nSentry.configureScope(scope => {\r\n  scope.addEventProcessor(async event => {\r\n    // Add anything to the event here\r\n    // returning null will not sent the event\r\n    return event;\r\n  });\r\n});\r\n```\r\n\r\nHope this helps."}}
{"actor":{"display_login":"HazAT"}}