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
<!-- Use this checklist to make sure your PR is ready for merge. You may
delete any sections you don't need. -->
## DESCRIBE YOUR PR
This PR updates the migration guide with all the new changes that
happened during Capacitor V3 beta.
## IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [x] Other deadline: 13/02/26
- [ ] None: Not urgent, can wait up to 1 week+
## SLA
- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
added an urgent due date to it.
Thanks in advance for your help!
## PRE-MERGE CHECKLIST
*Make sure you've checked the following before merging your changes:*
- [x] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
## LEGAL BOILERPLATE
<!-- Sentry employees and contractors can delete or ignore this section.
-->
Look, I get it. The entity doing business as "Sentry" was incorporated
in the State of Delaware in 2015 as Functional Software, Inc. and is
gonna need some rights from me in order to utilize my contributions in
this here PR. So here's the deal: I retain all rights, title and
interest in and to my contributions, and by keeping this boilerplate
intact I confirm that Sentry can use, modify, copy, and redistribute my
contributions, under Sentry's choice of terms.
## EXTRA RESOURCES
- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>
Copy file name to clipboardExpand all lines: docs/platforms/javascript/guides/capacitor/migration/v2-to-v3/index.mdx
+61-47Lines changed: 61 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,58 +4,57 @@ sidebar_order: 7919
4
4
description: "Learn about migrating from Sentry Capacitor SDK 2.x to 3.x"
5
5
---
6
6
7
-
<Alertlevel="warning"title="Important">
7
+
Version 3 of the Sentry Capacitor SDK introduces API cleanup, version support changes, and adds Capacitor 8 support.
8
8
9
+
The main goal of version 3 of Sentry Capacitor SDK is to provide compatibility with Sentry JavaScript version 10. To achieve this, the update includes breaking changes including the removal of deprecated APIs, reorganization of the npm package structure and also the refactoring on how you initialize Sentry Capacitor.
9
10
10
-
Version 3 is still under development, this documentation may change before the final release.
11
+
## Minimum Version Requirements
11
12
13
+
iOS, macOS, and tvOS have increased minimum version requirements:
12
14
13
-
</Alert>
15
+
-**iOS**: 15.0+ (previously 11.0+)
16
+
-**macOS**: 10.14+ (previously 10.13+)
17
+
-**tvOS**: 15.0+ (previously 11.0+)
14
18
15
-
Version 3 of the Sentry Capacitor SDK primarily introduces API cleanup and version support changes.
16
-
17
-
The main goal of version 3 of Sentry Capacitor SDK is to provide compatibility with Sentry JavaScript version 10. This update includes breaking changes due to the upgrade to JavaScript SDK v10, the removal of deprecated APIs, reorganization of the npm package structure and also the refactoring on how you initialize Sentry Capacitor.
19
+
## Self-Hosted Sentry Compatibility
18
20
21
+
If you are using a self-hosted Sentry instance, we recommend using version 24.4.2 or higher for full feature support.
19
22
20
23
## Major Changes in Sentry JS SDK v10
21
24
22
25
This update contains API cleanups related to `BaseClient`, `hasTracingEnabled`, and `logger` from `@sentry/core`.
23
-
Each Sibling SDK has specific changes in version 10, follow the tutorials below to update the SDK.
26
+
Each Sibling SDK has specific changes in version 10, follow the guides below to update the SDK.
24
27
25
-
-[Angular SDK 8.x to 9.x migration guide](/platforms/javascript/guides/angular/migration/v9-to-v10/).
26
-
-[React SDK 8.x to 9.x migration guide](/platforms/javascript/guides/react/migration/v9-to-v10/).
27
-
-[Vue SDK 8.x to 9.x migration guide](/platforms/javascript/guides/vue/migration/v9-to-v10/).
28
-
-[Nuxt SDK 8.x to 9.x migration guide](/platforms/javascript/guides/nuxt/migration/v9-to-v10/).
28
+
-[Angular SDK v9 to v10 migration guide](/platforms/javascript/guides/angular/migration/v9-to-v10/).
29
+
-[React SDK v9 to v10 migration guide](/platforms/javascript/guides/react/migration/v9-to-v10/).
30
+
-[Vue SDK v9 to v10 migration guide](/platforms/javascript/guides/vue/migration/v9-to-v10/).
31
+
-[Nuxt SDK v9 to v10 migration guide](/platforms/javascript/guides/nuxt/migration/v9-to-v10/).
29
32
30
33
## Important Capacitor SDK `3.x` Changes
31
34
32
35
This section describes the changes in Sentry Capacitor SDK, version 3.
33
36
34
-
### Changes on How You Initialize the SDK on Projects Using Vue or Nuxt.
37
+
### Changes on How You Initialize the SDK on Projects Using Vue or Nuxt
35
38
36
-
Starting on version `3.0.0`, calling `sentry.init` will break; to fix it, you will need to move the `sibling` parameters from the root option to `siblingOptions` inside the root of `CapacitorOptions`.
39
+
Starting in version `3.0.0`, Vue and Nuxt options must be nested inside `siblingOptions` rather than passed directly to `Sentry.init()`.
37
40
38
41
```JavaScript diff {tabTitle: Vue}
39
42
import*asSentryfrom'@sentry/capacitor';
40
43
import*asSentryVuefrom'@sentry/vue';
41
44
42
45
Sentry.init({
43
46
- app: app,
44
-
attachErrorHandler:false,
45
-
dsn:'...',
46
-
enableLogs:true,
47
47
- attachErrorHandler:false,
48
48
- attachProps:true,
49
-
-attachErrorHandler:true,
50
-
- tracingOptions:...
49
+
-tracingOptions: { ... },
50
+
dsn:'...',
51
51
+ siblingOptions: {
52
-
+ vueOptions: {
53
-
+ app: app,
54
-
+ attachErrorHandler:false,
55
-
+ attachProps:true,
56
-
+ attachErrorHandler:true,
57
-
+ tracingOptions:...
58
-
+ },
52
+
+ vueOptions: {
53
+
+ app: app,
54
+
+ attachErrorHandler:false,
55
+
+ attachProps:true,
56
+
+ tracingOptions: { ... },
57
+
+ },
59
58
+ },
60
59
}, SentryVue.init);
61
60
```
@@ -66,34 +65,50 @@ import * as SentryNuxt from '@sentry/nuxt';
66
65
67
66
Sentry.init({
68
67
- Vue: Vue,
69
-
attachErrorHandler:false,
70
-
dsn:'...',
71
-
enableLogs:true,
72
68
- attachErrorHandler:false,
73
69
- attachProps:true,
74
-
-attachErrorHandler:true,
75
-
- tracingOptions:...
70
+
-tracingOptions: { ... },
71
+
dsn:'...',
76
72
+ siblingOptions: {
77
-
+ nuxtOptions: {
78
-
+ Vue: Vue,
79
-
+ attachErrorHandler:false,
80
-
+ attachProps:true,
81
-
+ attachErrorHandler:true,
82
-
+ tracingOptions:...
83
-
+ },
73
+
+ nuxtOptions: {
74
+
+ Vue: Vue,
75
+
+ attachErrorHandler:false,
76
+
+ attachProps:true,
77
+
+ tracingOptions: { ... },
78
+
+ },
84
79
+ },
85
80
}, SentryNuxt.init);
86
81
```
87
82
88
-
### Logs are Out of Experimental
83
+
### Removed APIs
84
+
85
+
The following APIs have been removed or renamed:
86
+
87
+
-`BaseClient` → use `Client` instead
88
+
-`hasTracingEnabled()` → use `hasSpansEnabled()` instead
89
+
- Internal logger exports from `@sentry/core` → use `debug` and `SentryDebugLogger` types
90
+
91
+
### Logs Configuration Changes
92
+
93
+
Logging options have been moved out of the `_experiments` namespace. Update your configuration as follows:
94
+
95
+
```javascript diff
96
+
Sentry.init({
97
+
dsn:'...',
98
+
- _experiments: {
99
+
- enableLogs:true,
100
+
-beforeSendLog: (log) => log,
101
+
- },
102
+
+ enableLogs:true,
103
+
+beforeSendLog: (log) => log,
104
+
});
105
+
```
106
+
107
+
### Integration Changes
89
108
90
-
to keep using logs, you need to move your parameters from `Options._experimental.*` into `Options.*`, the `_experimental` field was removed on version `3.0.0` but may return once new experimental fields appear.
91
-
92
-
### Integration Changes
93
-
94
-
This version will include more integrations by default and also a new Spotlight integration that works on both Web and Mobile. See the list below with the new integrations:
This version restores several integrations that were previously missing and adds a new Spotlight integration that works on both Web and Mobile. The following integrations are now available:
0 commit comments