if shouldSendCallback returns false, messages are still sent to Sentry.
See original GitHub issueHi, I have been trying to disabled sentry in development and after attempting 3 different answers on the matter, including using shouldSendCallback
based on a post in the forums, I decided to post here as the only other explanation I have is that there’s a bug. Please let me know if that’s not the case and if I am missing something so I can close this issue.
Here is my code:
Raven.config(process.env.REACT_APP_RAVEN_DSN, { // DNS is actually empty string.
environment: process.env.NODE_ENV,
release: "0e4fdef800e35397aa53572",
debug: process.env.environment !== "production",
shouldSendCallback: function(data) {
return process.env.NODE_ENV === "production" // this is false.
}
}).install()
What is the current behavior? Messages are still sent to sentry in development, polluting our issues and slack.
What is the expected behavior? Messages should not be sent to Sentry when shouldSendCallback is false (we need a way to stop Sentry from spamming us when we are in development).
Which versions of Raven.js, and which browser and OS are affected by this issue? raven-js: 3.24.0 Chrome: Version 65.0.3325.181 (Official Build) (64-bit) MacOS: 10.13.3
Did this work in previous versions of Raven.js? I don’t think so.
Are you using the CDN (http://ravenjs.com)? No.
Are you using hosted Sentry or on-premises? If on-premises, which version (e.g. 8.7.0)? I am using Sentry.io.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
@kamilogorek i understand it’s hard to reproduce. It’s weird indeed. Could it be that there is some internal state/setting saved that makes us unable to block the messages from being sent? Although, that’s unlikely cuz my entire team is experiencing this.
I will try to strip it down as much as possible and set the breakpoints, although if you give me your email or email me @ harris@bureaubilly.com I can simply give you access to the repo.
Cheers and thanks again for your help!
I’m glad it helped 😃 Cheers!