shouldSendCallback() not working
See original GitHub issue- 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 affected event from your Sentry account
Package + Version
-
@sentry/browser
-
@sentry/node
-
raven-js
-
raven-node
(raven for node) - other:
Version:
^5.6.2
Description
I’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.
So I am confused why beforeSend
method works with console.log(), but the other two do not.
I’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.
My config:
{
dsn: '<my_dsn>',
release: process.env.RELEASE,
environment: process.env.NODE_ENV
// not working
shouldSendCallback(data) {
console.log('data1:', data);
return true;
},
// not working
dataCallback(data) {
console.log('data2:', data);
return data;
},
// working fine
beforeSend(event) {
console.log('event:', event)
return event;
},
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Configuration | Sentry Documentation
{ shouldSendCallback: function(data) { return false; } }. maxMessageLength: By default, Raven does not truncate messages. If you need to truncate characters ...
Read more >Configuration — raven-js 3.4.0 documentation - Read the Docs
js in an environment like React Native or Electron, where your application is running “natively” on a device and not accessed at a...
Read more >Sentry/Raven with Meteor on Server - help
Meteor.startup(function () { let sentryURL = 'https://' + ... See: https://github.com/meteorhacks/kadira/issues/193 var message = m; ...
Read more >Raven Testkit | Sentry-Testkit
Raven Testkit (Legacy API). Raven is a JavaScript SDK published by Sentry.io to enable software flow tracking and issues reporting to the Sentry...
Read more >raven-js | Yarn - Package Manager
... crashing React Native plugin unless shouldSendCallback is specified. ... Fixed an issue with the require.js plugin basically not working at all.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks, updated https://github.com/getsentry/static-sites/pull/406
This page needs updating: https://help.sentry.io/account/billing/do-ignored-events-in-the-ui-count-towards-my-quota/
And this is an updated link to before_send https://docs.sentry.io/platforms/python/configuration/options/#before-send