question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

if shouldSendCallback returns false, messages are still sent to Sentry.

See original GitHub issue

Hi, 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:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
harrisrobincommented, Apr 5, 2018

@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!

0reactions
kamilogorekcommented, Apr 6, 2018

I’m glad it helped 😃 Cheers!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuration | Sentry Documentation
Return false to throw away the breadcrumb. A callback function that allows you to apply your own filters to determine if the message...
Read more >
raven-js Documentation
A callback function that allows you to apply your own filters to determine if the message should be sent to. Sentry. {. shouldSendCallback: ......
Read more >
Sentry/Raven with Meteor on Server - help
shouldSendCallback : function(data) { return commitInfo.appHash !== 'dev'; // here you can decide if you want to send the errors to Sentry ......
Read more >
NodeClient | Sentry JavaScript SDKs
A promise that resolves when all current events have been sent. If you provide a timeout and the queue takes longer to drain...
Read more >
raven-js/CHANGELOG.md - UNPKG
26, * FIX: Bower build. 27. 28, ## 3.26.0. 29. 30, * REF: Return location.origin instead of assigning it for IE10. 31, *...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found