Title: shouldSendCallback() not working · Issue #2253 · getsentry/sentry-javascript · GitHub
Open Graph Title: shouldSendCallback() not working · Issue #2253 · getsentry/sentry-javascript
X Title: shouldSendCallback() not working · Issue #2253 · getsentry/sentry-javascript
Description: Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javascript/releases Provide a link to the aff...
Open Graph Description: Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javas...
X Description: Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javas...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/2253
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"shouldSendCallback() not working","articleBody":"\u003c!-- 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- [ ] Provide a link to the affected event from your Sentry account\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\n^5.6.2\r\n```\r\n\r\n## Description\r\n\r\nI'm trying to leverage `shouldSendCallback` and `dataCallback`, but nothing get's logged when I forcefully throw errors. However, `beforeSend` does log the event when the forced errors occur. \r\n\r\nSo I am confused why `beforeSend` method works with console.log(), but the other two do not.\r\n\r\nI've been using Sentry for a few months and everything has worked fine, it is only now with the two methods mentioned above that I cannot seem to get them to log anything for me to confirm they are working.\r\n\r\nMy config:\r\n\r\n```\r\n\r\n{\r\n dsn: '\u003cmy_dsn>',\r\n release: process.env.RELEASE,\r\n environment: process.env.NODE_ENV\r\n\r\n // not working\r\n shouldSendCallback(data) {\r\n console.log('data1:', data);\r\n return true;\r\n },\r\n\r\n // not working\r\n dataCallback(data) {\r\n console.log('data2:', data);\r\n return data;\r\n },\r\n\r\n // working fine\r\n beforeSend(event) {\r\n console.log('event:', event)\r\n return event;\r\n },\r\n\r\n```","author":{"url":"https://github.com/jaimefps","@type":"Person","name":"jaimefps"},"datePublished":"2019-09-26T21:18:54Z","url":"https://github.com/getsentry/sentry-javascript/issues/2253"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:088b22cd-c358-3bbb-c166-410a88352f50 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C3DA:1F98:1F9D429:29E1A2B:6B042FA2 |
| html-safe-nonce | 44f34000648953702626971389bbcdc969b9d2eceefc30aa5c2f74869d050261 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDM0RBOjFGOTg6MUY5RDQyOToyOUUxQTJCOjZCMDQyRkEyIiwidmlzaXRvcl9pZCI6IjEzNTQyNTEwOTE5OTQ0ODg3MzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1c3720a6968660e32b803f06ecace03f4574f718ad0ce33028deaaa2d7dbbe02 |
| hovercard-subject-tag | issue:499121470 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/2253/issue_layout |
| twitter:image | https://opengraph.githubassets.com/42616868f5f6feff4657485ead7a2c9fef5aebe7d47a80470f2df742a32e2e45/getsentry/sentry-javascript/issues/2253 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/42616868f5f6feff4657485ead7a2c9fef5aebe7d47a80470f2df742a32e2e45/getsentry/sentry-javascript/issues/2253 |
| og:image:alt | Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javas... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jaimefps |
| hostname | github.com |
| expected-hostname | github.com |
| None | b7a1d2b9101496921b08579fbee988d014345aef2f5bd660d1f8c7332d81560e |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c3dd496c3da6ea6b77e69c09279d2b81604654f1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width