You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Follow this guide to upgrade from one major version to the other.
4
+
position: 10
5
+
category: Guide
6
+
---
7
+
8
+
Follow this guide to upgrade from one major version to the other.
9
+
10
+
## Upgrading from v6 to v7
11
+
12
+
Sentry SDK dependencies updated from v6 to v7. Please read about breaking changes in Sentry SDK's [Upgrading from v6.x to v7.x](https://github.com/getsentry/sentry-javascript/blob/master/MIGRATION.md#upgrading-from-6x-to-7x) document.
13
+
14
+
Some of the breaking changes listed in that document are automatically handled by the module and don't need any action. Other notable changes that might require action are:
15
+
16
+
- When using the `tracing` option, the `@sentry/tracing` dependency needs to be upgraded from v6.x to v7.x.
17
+
- The `whitelistUrls` and `blacklistUrls` Sentry `config` (or `clientConfig` / `serverConfig`) options have been renamed to `allowUrls` and `denyUrls`.
18
+
- The `Vue` integration was removed as is now merged into the Sentry Browser SDK. If you have been passing custom `Vue` options through the `clientIntegrations.Vue` object then those can now be merged directly into the `clientConfig` option (without the parent `Vue` key).
19
+
- The `UserAgent` integration was renamed to `HttpContext`. If you have been passing custom configuration to that integration through `clientIntegrations` option then you should rename the key.
// Those options are shared by both the Browser and the Server instances.
46
+
// Browser-only and Server-only options should go
47
+
// into `clientConfig` and `serverConfig` objects respectively.
47
48
},
48
49
}
49
50
}
50
51
```
51
52
53
+
See [Options](/sentry/options) for a list of available options.
54
+
55
+
<alerttype="info">
56
+
57
+
For Typescript or type-checked JavaScript projects, you might have to install the `@sentry/tracing` package even when not using the tracing functionality. In that case, the package can be installed as a dev-only dependency.
58
+
59
+
</alert>
60
+
52
61
## Types
53
62
54
-
For typescript projects, add `@nuxtjs/sentry` to tsconfig types array
63
+
In Typescript or type-checked JavaScript projects, add `@nuxtjs/sentry` to the `types` array in `tsconfig.json` to enable module types.
55
64
56
65
```json [tsconfig.json]
57
66
{
@@ -62,7 +71,3 @@ For typescript projects, add `@nuxtjs/sentry` to tsconfig types array
62
71
}
63
72
}
64
73
```
65
-
66
-
## Configuration
67
-
68
-
See [Options](/sentry/options) for a list of available options
Copy file name to clipboardExpand all lines: docs/content/en/sentry/lazy-loading.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ You can also pass a lazy config object in your module options (see [options](/se
20
20
#### `$sentry` (mocked)
21
21
- Type: `Object`
22
22
23
-
Normally `$sentry` would always refer to the `@sentry/browser` API. But if we lazy load Sentry this API wont be available until Sentry has loaded. If you don't want to worry about whether Sentry is loaded or not, a mocked Sentry API is injected into the Nuxt.js context that will execute all Sentry API calls once Sentry is loaded
23
+
Normally `$sentry` would always refer to the `@sentry/vue` API. But if we lazy load Sentry this API wont be available until Sentry has loaded. If you don't want to worry about whether Sentry is loaded or not, a mocked Sentry API is injected into the Nuxt.js context that will execute all Sentry API calls once Sentry is loaded
24
24
25
25
See: [`injectMock`](/sentry/options#lazy) and [`mockApiMethods`](/sentry/options#lazy) options.
Copy file name to clipboardExpand all lines: docs/content/en/sentry/options.md
+39-33Lines changed: 39 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,13 +12,13 @@ Options can be passed using either:
12
12
13
13
The `config`, `serverConfig` and `clientConfig` options can also be configured using [Runtime Config](/sentry/runtime-config).
14
14
15
-
Normally, just setting DSN would be enough.
15
+
The `dsn` is the only option that is required to enable Sentry reporting.
16
16
17
17
### dsn
18
18
19
19
- Type: `String`
20
20
- Default: `process.env.SENTRY_DSN || ''`
21
-
- If no `dsn` is provided, Sentry will be initialised, but errors will not be logged. See [#47](https://github.com/nuxt-community/sentry-module/issues/47) for more information about this.
21
+
- If no `dsn` is provided then Sentry will be initialized using mocked instance to prevent the code that references `$sentry` from crashing. No errors will be reported using that mocked instance.
22
22
23
23
### lazy
24
24
@@ -68,7 +68,7 @@ Normally, just setting DSN would be enough.
68
68
-**mockApiMethods**
69
69
- Type:`Boolean` or `Array`
70
70
- Default `true`
71
-
- Which API methods from `@sentry/browser` should be mocked. You can use this to only mock methods you really use.
71
+
- Which API methods from `@sentry/vue` should be mocked. You can use this to only mock methods you really use.
72
72
- This option is ignored when `injectMock: false`
73
73
- If `mockApiMethods: true` then all available API methods will be mocked
74
74
> If `injectMock: true` then _captureException_ will always be mocked for use with the window.onerror listener
@@ -231,22 +231,23 @@ Note that the module sets the following defaults when publishing is enabled:
- Sentry by default also enables these browser integrations: `InboundFilters`, `FunctionToString`, `TryCatch`, `Breadcrumbs`, `GlobalHandlers`, `LinkedErrors`, `UserAgent`. Their options can be overridden by specifying them manually in the object.
242
-
- Here is the full list of client integrations that are supported: `Breadcrumbs`, `CaptureConsole`, `Debug`, `Dedupe`, `ExtraErrorData`, `FunctionToString`, `GlobalHandlers`, `InboundFilters`, `LinkedErrors`, `ReportingObserver`, `RewriteFrames`, `TryCatch`, `UserAgent`, `Vue`.
243
-
- User-provided configuration is merged with the default configuration so to disable integration that is enabled by default, you have to pass `false` as a value. For example to disable `ExtraErrorData` integration (only), set the option to:
239
+
- Sentry by default also enables the following browser integrations: `InboundFilters`, `FunctionToString`, `TryCatch`, `Breadcrumbs`, `GlobalHandlers`, `LinkedErrors`, `Dedupe`, `HttpContext`.
240
+
- The full list of client integrations that are supported: `Breadcrumbs`, `CaptureConsole`, `Debug`, `Dedupe`, `ExtraErrorData`, `FunctionToString`, `GlobalHandlers`, `HttpContext`, `InboundFilters`, `LinkedErrors`, `ReportingObserver`, `RewriteFrames`, `TryCatch`.
241
+
- Integration options can be specified in the object value corresponding to the individual integration key.
242
+
- To disable integration that is enabled by default, pass `false` as a value. For example to disable `ExtraErrorData` integration (only), set the option to:
244
243
```js
245
244
{
246
-
ExtraErrorData: false
245
+
ExtraErrorData: false,
246
+
ReportingObserver: {},
247
+
RewriteFrames: {},
247
248
}
248
249
```
249
-
- See https://docs.sentry.io/platforms/javascript/configuration/integrations/default/ and https://docs.sentry.io/platforms/javascript/configuration/integrations/plugin/ for more information on the integrations and their configuration
250
+
- See also [Sentry Browser Integrations](https://docs.sentry.io/platforms/javascript/guides/vue/configuration/integrations/) for more information on configuring each integration.
250
251
251
252
### serverIntegrations
252
253
@@ -257,17 +258,20 @@ Note that the module sets the following defaults when publishing is enabled:
257
258
Dedupe: {},
258
259
ExtraErrorData: {},
259
260
RewriteFrames: {},
260
-
Transaction: {}
261
261
}
262
262
```
263
-
- Here is the full list of server integrations that are supported: `CaptureConsole`, `Debug`, `Dedupe`, `ExtraErrorData`, `RewriteFrames`, `Modules`, `Transaction`.
264
-
- User-provided configuration is merged with the default configuration so to disable integration that is enabled by default, you have to pass `false` as a value. For example to disable `ExtraErrorData` integration (only), set the option to:
263
+
- Sentry by default also enables the following server integrations: `InboundFilters`, `FunctionToString`, `Console`, `Http`, `OnUncaughtException`, `OnUnhandledRejection`, `ContextLines`, `Context`, `Modules`, `RequestData`, `LinkedErrors`.
264
+
- The full list of server integrations that are supported includes the ones above plus: `CaptureConsole`, `Debug`, `Dedupe`, `ExtraErrorData`, `RewriteFrames`, `Transaction`.
265
+
- Integration options can be specified in the object value corresponding to the individual integration key.
266
+
- To disable integration that is enabled by default, pass `false` as a value. For example to disable `ExtraErrorData` integration (only), set the option to:
265
267
```js
266
268
{
267
-
ExtraErrorData: false
269
+
Dedupe: {},
270
+
ExtraErrorData: false,
271
+
RewriteFrames: {},
268
272
}
269
273
```
270
-
- See https://docs.sentry.io/platforms/node/pluggable-integrations/ for more information on the integrations and their configuration
274
+
- See also [Sentry Server Integrations](https://docs.sentry.io/platforms/node/configuration/integrations/) for more information on configuring each integration.
271
275
272
276
### customClientIntegrations
273
277
@@ -308,29 +312,29 @@ export default function () {
308
312
309
313
<alert type="info">
310
314
311
-
`@sentry/tracing@6` (version 6 and not newer) should be installed manually when using this option.
315
+
`@sentry/tracing@7` (version 7) should be installed manually when using this option.
312
316
313
317
</alert>
314
318
315
-
- Enables the BrowserTracing integration for client performance monitoring
319
+
- Enables Sentry Performance Monitoring on the [server](https://docs.sentry.io/platforms/node/performance/) and [browser](https://docs.sentry.io/platforms/javascript/guides/vue/performance/) side.
316
320
- Takes the following object configuration format (default values shown):
317
321
```js
318
322
{
319
323
tracesSampleRate: 1.0,
324
+
browserTracing: {},
320
325
vueOptions: {
321
-
tracing: true,
322
-
tracingOptions: {
323
-
hooks: [ 'mount', 'update' ],
324
-
timeout: 2000,
325
-
trackComponents: true
326
-
}
326
+
trackComponents: true,
327
327
},
328
-
browserOptions: {}
329
328
}
330
329
```
331
-
- Sentry documentation strongly recommends reducing the `tracesSampleRate` value; it should be between 0.0 and 1.0 (percentage of requests to capture)
332
-
- The `vueOptions` are passed to the `Vue` integration, see https://docs.sentry.io/platforms/javascript/guides/vue/#monitor-performance for more information
333
-
- `browserOptions` are passed to the `BrowserTracing` integration, see https://github.com/getsentry/sentry-javascript/tree/master/packages/tracing for more information
330
+
- On the browser side the `BrowserTracing` integration is enabled by default and adds automatic instrumentation for monitoring the performance of the application. See available [`BrowserTracing` options](https://docs.sentry.io/platforms/javascript/guides/vue/performance/instrumentation/automatic-instrumentation/).
331
+
- On the browser side extra options for [Tracking Vue components](https://docs.sentry.io/platforms/javascript/guides/vue/features/component-tracking/) can be passed through the `vueOptions` object.
332
+
333
+
<alert type="info">
334
+
335
+
The `tracesSampleRate` value can be between 0.0 and 1.0 (percentage of requests to capture) and Sentry documentation strongly recommends reducing the value from the default 1.0.
336
+
337
+
</alert>
334
338
335
339
### config
336
340
@@ -341,22 +345,24 @@ export default function () {
- Sentry options common to the server and client that are passed to `Sentry.init(options)`. See Sentry documentation at https://docs.sentry.io/platforms/javascript/guides/vue/configuration/options/
345
-
- Note that `config.dsn` is automatically set based on the root `dsn` option
346
-
- The value for `config.release` is automatically inferred from the local repo unless specified manually
347
-
- Do not use `config.integrations`, use clientIntegrations or serverIntegrations
348
+
- Sentry options common to the Server and Browser SDKs that are passed to `Sentry.init()`. See Sentry's documentation for [Basic Browser Options](https://docs.sentry.io/platforms/javascript/guides/vue/configuration/options/) and [Basic Server Options](https://docs.sentry.io/platforms/node/configuration/options/).
349
+
- Note that `config.dsn` is automatically set based on the root `dsn` option.
350
+
- The value for`config.release` is automatically inferred from the local repo unless specified manually.
351
+
- Do not set`config.integrations`, use `clientIntegrations` and `serverIntegrations` options instead.
348
352
349
353
### serverConfig
350
354
351
355
- Type:`Object`
352
356
- Default:`{}`
353
-
- Specified key will override common Sentry options for server sentry plugin
357
+
- Server-specific Sentry SDK options.
358
+
- The specified keys will override common options set in the `config` key.
354
359
355
360
### clientConfig
356
361
357
362
- Type:`Object`
358
363
- Default:`{}`
359
-
- Specified keys will override common Sentry options for client sentry plugin
364
+
- Browser-specific Sentry SDK options.
365
+
- The specified keys will override common options set in the `config` key.
0 commit comments