Skip to content

Commit

Permalink
ref(vue): Update logErrors description (#6392)
Browse files Browse the repository at this point in the history
Following getsentry/sentry-javascript#7310 where we flipped the default value of `logErrors` from `false` to `true`, this PR updates the docs accordingly and removes the now obsolete warning regarding the SDK suppressing error logs by default.
  • Loading branch information
Lms24 authored Mar 2, 2023
1 parent 5e6fce0 commit 241084d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
10 changes: 2 additions & 8 deletions src/platform-includes/getting-started-config/javascript.vue.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,11 @@ Sentry.init({

const miscApp = createApp(MiscApp);
miscApp.mixin(Sentry.createTracingMixins({ trackComponents: true }));
Sentry.attachErrorHandler(miscApp, { logErrors: true });
Sentry.attachErrorHandler(miscApp);
```

The SDK accepts a few different configuration options that let you change its behavior:

- `attachProps` (defaults to `true`) - Includes all Vue components' props with the events.
- `logErrors` (defaults to `false`) - Decides whether SDK should call Vue's original `logError` function as well.
- `logErrors` (defaults to `true`) - Decides whether SDK should call Vue's original `logError` function as well.
- `trackComponents` (defaults to `false`) - Track your app's components. Learn more about [component tracking](./features/component-tracking) and all its options.

<Note>

If you enable the SDK, Vue will not call its `logError` internally. As a result, errors occurring in the Vue renderer will not display in the developer console. To preserve this functionality, pass the `logErrors: true` option.

</Note>
7 changes: 0 additions & 7 deletions src/wizard/javascript/vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,3 @@ app.mount("#app");
```

We recommend adjusting the value of `tracesSampleRate` in production. Learn more about configuring sampling in our [full documentation](https://docs.sentry.io/platforms/javascript/configuration/sampling/).

<div class="alert alert-warning" role="alert"><h5 class="no_toc">Vue Error Handling</h5><div class="alert-body content-flush-bottom">
Please note that if you enable this integration, by default Vue will not call its `logError` internally.
This means that errors occurring in the Vue renderer will not show up in the developer console.
If you want to preserve this functionality, make sure to pass the `logErrors: true` option.
</div>
</div>

1 comment on commit 241084d

@vercel
Copy link

@vercel vercel bot commented on 241084d Mar 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

sentry-docs – ./

sentry-docs.sentry.dev
sentry-docs-git-master.sentry.dev
docs.sentry.io

Please # to comment.