-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Disable for development #105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Found a solution, but it's not ideal... I was trying to manually set So instead I stopped using Pretty messy fix though :( |
@adambiggs Another solution is to create a wrapping AMD module for Raven-js which does the configure & install call, which means you only import raven-js once, but can import your own module multiple times, afaik. I think this may be related to: #109 and #91 (comment) |
This shouldn't be relevant anymore. |
@mattrobenolt, I've upgraded to 1.1.11 and I'm not calling |
@bobbyrenwick Can you link me to something public that is showing this happening? |
Is there a workaround for this? Even when I never call |
See: #282 :) |
Are you providing #282 as just background? I don't see any workarounds in there. |
Yes, because there is no solution yet. |
My only fix is to use |
Is there an update on this? |
Any update? It STILL doesn't work correctly. EDIT: Sorry for my tone. Had a long day. |
What are you trying to do? I'm doing this, which is working just fine: if (process.env.RAVEN_DSN) {
require('raven-js').config(process.env.RAVEN_DSN, {
environment: process.env.NODE_ENV,
}).install();
} Where |
In your version it's impossible to conditionally set up an Angular ErrorHandler. Either you set it up in every case, and then it swallows your errors no matter what, or don't but still list it in providers, which od dev causes entire module to crash. As far as I know it's impossible to use or not use an Angular provider based on a condition. I've done many iterations of fix attempts today. |
To be honest that sounds to me like an Angular issue rather than a Raven one. Having said that, I agree that a more general solution would be a good addition. Just a thought: have you tried setting a pattern in the Or maybe set |
It's possible to prevent Raven from sending requests and even from catching errors, but that doesn't stop the Angular ErrorHandler from swallowing errors (= at least losing track of actual lines from where errors were thrown). I suppose you're right and it's not much of a Raven issue after all. |
For those coming here trying to figure it out still, it was a config option I missed at first import Raven from 'raven-js';
const env = 'prod';
const release = '12345';
Raven
.config('https://<example>@sentry.io/1234', {
environment: env,
release: release,
shouldSendCallback: () => {
// Do your logic here...
return ['prod', 'staging'].indexOf(env) !== -1;
},
})
.install(); If |
Make your DSN the empty string. It will disable reporting |
I have used this way. It seems working for me
and in providers Please let me know if I am doing anything wrong here. |
To run sentry locally, you're going to have to run `yarn start` Notes: - could have also set the DSN string to empty, as per this comment getsentry/sentry-javascript#105 (comment) but not installing at all seems cleaner Also, since sentry is client-side only, it doesn't look like it's getting run anymore when emails fail to send. Should really get that figured out.
To run sentry locally, you're going to have to run `yarn start` Notes: - could have also set the DSN string to empty, as per this comment getsentry/sentry-javascript#105 (comment) but not installing at all seems cleaner Also, since sentry is client-side only, it doesn't look like it's getting run anymore when emails fail to send. Should really get that figured out.
To run sentry locally, you're going to have to run `yarn start` Notes: - could have also set the DSN string to empty, as per this comment getsentry/sentry-javascript#105 (comment) but not installing at all seems cleaner Also, since sentry is client-side only, it doesn't look like it's getting run anymore when emails fail to send. Should really get that figured out.
I'm having trouble figuring out how to restore the
window.onerror
event after including Raven as an AMD dependancy.I don't want to use Raven at all during development, so I'm only calling
config()
/install()
in production mode. But in dev mode all errors are still being thrown byTraceKit.report()
... Which is pretty frustrating since the file/line number/stack trace isn't helpful anymore in the browser dev tools.I've tried calling
uninstall()
in dev mode but that didn't help. Is there a reason you're binding towindow.onerror
no matter what instead of doing it insideconfig()
orinstall()
?The text was updated successfully, but these errors were encountered: