-
Notifications
You must be signed in to change notification settings - Fork 111
fix: enable console logging of Vue errors in development #214
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
Conversation
Sentry by default swallows all errors caught by Vue error handler. This options re-posts them so that they show up in the console.
Codecov Report
@@ Coverage Diff @@
## master #214 +/- ##
=======================================
Coverage 55.55% 55.55%
=======================================
Files 1 1
Lines 27 27
Branches 8 8
=======================================
Hits 15 15
Misses 9 9
Partials 3 3
Continue to review full report at Codecov.
|
lib/module.js
Outdated
@@ -28,7 +28,7 @@ export default function SentryModule (moduleOptions) { | |||
ExtraErrorData: {}, | |||
ReportingObserver: {}, | |||
RewriteFrames: {}, | |||
Vue: { attachProps: true } | |||
Vue: { attachProps: true, logErrors: true } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we make it configurable anyway? That should be a quick fix and logging in production could be frowned upon..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically it is configurable by overriding clientIntegrations
.
I wouldn't be opposed to adding a configuration option specifically for that if I would have a good place for it. I don't think that adding a new global option for configuring one specific integration would be worth it...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really see any problems with posting errors in production as those are client errors and there is nothing to hide there.
But I'm open to setting the default value to this.options.dev
instead.
I've just realized that, since we are deep-merging options, it's easy to override settings for a specific integration but at the same time it's not possible to disable integration that is enabled by default. But since no one has complained yet about that, we can leave as is. |
As long as logging in prod is configurable then Im happy :) |
Sentry by default swallows all errors caught by Vue error handler. This
options re-posts them so that they show up in the console.
I have always had this enabled in my configuration and I think it makes sense to have it enabled by default.