Skip to content

Commit d44f7d2

Browse files
Lms24s1gr1d
andauthored
fix(vue): Remove outdated Vue SDK options (#13192)
- Removed the entire "Vue specific Options" subsection as it doesn't really make sense in a Vue-specific onboarding guide: - Removed `logErrors` as this is now just default behaviour - Removed `tracingOptions` - Moved `attachProps` to general options page (`PlatformSection`ed of course) - Added `attachErrorHandler` to general options page (`PlatformSection`ed of course) - Added highlighting to `Sentry.init` code block --------- Co-authored-by: Sigrid Huemer <[email protected]>
1 parent dd5ebac commit d44f7d2

File tree

2 files changed

+21
-10
lines changed

2 files changed

+21
-10
lines changed

docs/platforms/javascript/common/configuration/options.mdx

+19
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,25 @@ By the time `beforeSend` is executed, all scope data has already been applied to
292292

293293
</SdkOption>
294294

295+
<PlatformSection supported={["javascript.vue", "javascript.nuxt"]}>
296+
297+
<SdkOption name="attachProps" type='boolean' defaultValue='true' categorySupported={['browser']}>
298+
299+
When enabled, all props of the Vue component where the error was thrown in are attached to the event.
300+
301+
</SdkOption>
302+
303+
<SdkOption name="attachErrorHandler" type='boolean' defaultValue='true' categorySupported={['browser']}>
304+
By default, the SDK attaches a [Vue error handler](https://vuejs.org/api/application.html#app-config-errorhandler)
305+
to capture Vue exceptions and report them to Sentry.
306+
When `attachErrorHandler` is set to `false`, automatic error reporting is disabled.
307+
308+
Usually, this option should stay enabled, unless you want to set up Sentry error reporting yourself.
309+
For example, the Sentry Nuxt SDK does not attach an error handler as it's capturing errors through the error hooks provided by Nuxt.
310+
</SdkOption>
311+
312+
</PlatformSection>
313+
295314
## Tracing Options
296315

297316
<SdkOption name="tracesSampleRate" type='number' envVar='SENTRY_TRACES_SAMPLE_RATE'>

docs/platforms/javascript/guides/vue/index.mdx

+2-10
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Configuration should happen as early as possible in your application's lifecycle
3838

3939
To initialize Sentry in your Vue application, add the following code snippet to your `main.js`:
4040

41-
```javascript {tabTitle:Vue 3} {filename:main.js} {"onboardingOptions": {"performance": "16, 19-25", "session-replay": "17, 29-35"}}
41+
```javascript {tabTitle:Vue 3} {filename:main.js} {3, 12-36} {"onboardingOptions": {"performance": "16, 19-25", "session-replay": "17, 29-35"} }
4242
import { createApp } from "vue";
4343
import { createRouter } from "vue-router";
4444
import * as Sentry from "@sentry/vue";
@@ -80,7 +80,7 @@ app.use(router);
8080
app.mount("#app");
8181
```
8282

83-
```javascript {tabTitle:Vue 2} {filename:main.js} {"onboardingOptions": {"performance": "15, 18-24", "session-replay": "16, 28-34"}}
83+
```javascript {tabTitle:Vue 2} {filename:main.js} {3, 11-35} {"onboardingOptions": {"performance": "15, 18-24", "session-replay": "16, 28-34"}}
8484
import Vue from "vue";
8585
import Router from "vue-router";
8686
import * as Sentry from "@sentry/vue";
@@ -127,14 +127,6 @@ new Vue({
127127

128128
If you're creating more than one Vue 3 app within your application, check out how to initialize the SDK for [multiple apps](./features/multiple-apps).
129129

130-
### Vue-Specific configuration
131-
132-
The SDK accepts a few Vue-specific `Sentry.init` configuration options:
133-
134-
- `attachProps` (defaults to `true`) - Includes all Vue components' props with the events.
135-
- `logErrors` (defaults to `true`) - Decides whether SDK should call Vue's original `logError` function as well.
136-
- Check out how to [Track Vue Components](./features/component-tracking) for performance.
137-
138130
### Late-Defined Vue Apps
139131

140132
If the Vue application is not defined from the start, you can add error monitoring for Vue-specific errors later on.

0 commit comments

Comments
 (0)